Really fix incorrect neighbor updating

This commit is contained in:
Shadowfacts 2019-01-09 18:10:23 -05:00
parent 6b23fefbbe
commit 60c785dc2b
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 5 additions and 1 deletions

View File

@ -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<ItemStack> getDroppedStacks(Entry e, ServerWorld world, BlockPos pos) {