diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 983e9d35f..6e293278b 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -669,9 +669,10 @@ public class AllBlocks { static { for (DyeColor colour : DyeColor.values()) { String colourName = colour.getName(); + SeatMovementBehaviour movementBehaviour = new SeatMovementBehaviour(); REGISTRATE.block(colourName + "_seat", p -> new SeatBlock(p, colour == DyeColor.RED)) .initialProperties(SharedProperties::wooden) - .onRegister(AllMovementBehaviours.addMovementBehaviour(new SeatMovementBehaviour())) + .onRegister(AllMovementBehaviours.addMovementBehaviour(movementBehaviour)) .blockstate((c, p) -> { p.simpleBlock(c.get(), p.models() .withExistingParent(colourName + "_seat", p.modLoc("block/seat")) diff --git a/src/main/java/com/simibubi/create/AllMovementBehaviours.java b/src/main/java/com/simibubi/create/AllMovementBehaviours.java index 5032ace15..bc5274f2d 100644 --- a/src/main/java/com/simibubi/create/AllMovementBehaviours.java +++ b/src/main/java/com/simibubi/create/AllMovementBehaviours.java @@ -16,7 +16,9 @@ import net.minecraft.util.ResourceLocation; public class AllMovementBehaviours { private static final HashMap movementBehaviours = new HashMap<>(); - private static void addMovementBehaviour(ResourceLocation resourceLocation, MovementBehaviour movementBehaviour) { + public static void addMovementBehaviour(ResourceLocation resourceLocation, MovementBehaviour movementBehaviour) { + if (movementBehaviours.containsKey(resourceLocation)) + Create.logger.warn("Movement behaviour for " + resourceLocation.toString() + " was overridden"); movementBehaviours.put(resourceLocation, movementBehaviour); }