Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
}
}
Expand Down