From 6baa51997343dfe3d7c0b4c33ca92adc4868609c Mon Sep 17 00:00:00 2001 From: Snownee Date: Fri, 12 Mar 2021 23:46:26 +0800 Subject: [PATCH] Fix cart assembler duplication (closes #1058, #1150) --- .../structureMovement/mounted/CartAssemblerBlock.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java index 786c994a4..bc4e96b43 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/CartAssemblerBlock.java @@ -366,8 +366,6 @@ public class CartAssemblerBlock extends AbstractRailBlock @Override public void neighborChanged(@Nonnull BlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull Block blockIn, @Nonnull BlockPos fromPos, boolean isMoving) { - super.neighborChanged(state, worldIn, pos, blockIn, fromPos, isMoving); - if (worldIn.isRemote) return; @@ -375,6 +373,8 @@ public class CartAssemblerBlock extends AbstractRailBlock if (previouslyPowered != worldIn.isBlockPowered(pos)) { worldIn.setBlockState(pos, state.cycle(POWERED), 2); } + + super.neighborChanged(state, worldIn, pos, blockIn, fromPos, isMoving); } @Override @@ -439,7 +439,7 @@ public class CartAssemblerBlock extends AbstractRailBlock @Override public ItemRequirement getRequiredItems(BlockState state) { - ArrayList reuiredItems = new ArrayList(); + ArrayList reuiredItems = new ArrayList<>(); reuiredItems.add(new ItemStack(getRailItem(state))); reuiredItems.add(new ItemStack(asItem())); return new ItemRequirement(ItemUseType.CONSUME, reuiredItems);