From 60c785dc2ba8f8fec230a4f93434aa124ed1b2ad Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Wed, 9 Jan 2019 18:10:23 -0500 Subject: [PATCH] Really fix incorrect neighbor updating --- .../container/AbstractContainerBlockEntity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/shadowfacts/simplemultipart/container/AbstractContainerBlockEntity.java b/src/main/java/net/shadowfacts/simplemultipart/container/AbstractContainerBlockEntity.java index 1c6c2b2..23ec464 100644 --- a/src/main/java/net/shadowfacts/simplemultipart/container/AbstractContainerBlockEntity.java +++ b/src/main/java/net/shadowfacts/simplemultipart/container/AbstractContainerBlockEntity.java @@ -193,7 +193,11 @@ public abstract class AbstractContainerBlockEntity extends BlockEntity implement world.scheduleBlockRender(pos); BlockState blockState = world.getBlockState(pos); world.updateListeners(pos, blockState, blockState, 3); - world.updateNeighbors(pos, blockState.getBlock()); + + // both of these are required, some blocks (e.g. torch) use getStateForNeighborUpdate (used by updateNeighborStates) + // to update themselves, and some (e.g. redstone dust) use neighborUpdate to do so + blockState.updateNeighborStates(world, pos, 3); // updates the blockstates of the neighbors in the world + world.updateNeighbors(pos, blockState.getBlock()); // calls neighborUpdate on the neighbor blocks } private List getDroppedStacks(Entry e, ServerWorld world, BlockPos pos) {