diff --git a/src/main/java/com/ldtteam/structurize/placement/handlers/placement/PlacementHandlers.java b/src/main/java/com/ldtteam/structurize/placement/handlers/placement/PlacementHandlers.java index bd0972d60..3b5b2dcc6 100644 --- a/src/main/java/com/ldtteam/structurize/placement/handlers/placement/PlacementHandlers.java +++ b/src/main/java/com/ldtteam/structurize/placement/handlers/placement/PlacementHandlers.java @@ -117,10 +117,10 @@ public static void add(IPlacementHandler handler, Class override, final AddTy switch (addType) { case BEFORE: - handlers.add(i - 1, handler); + handlers.add(i, handler); break; case AFTER: - handlers.add(i, handler); + handlers.add(i+1, handler); break; case REPLACE: handlers.set(i, handler); @@ -134,16 +134,15 @@ public static void add(IPlacementHandler handler, Class override, final AddTy } /** - * Adds a handler to the start of the handlers list, - * effectively overriding existing ones with similar - * 'canHandle' functions because this one will evaluate before them + * Adds a handler to the start of the handlers list, right after the air, solid and light placeholder handlers. + * This may effectively override existing ones with similar 'canHandle' functions because this one will evaluate before them. * @param handler */ public static void add(IPlacementHandler handler) { synchronized (handlers) { - handlers.add(1, handler); + handlers.add(3, handler); handlerCache.clear(); } }