Fix #5290; do a double-block update for cardboard boxes to ensure double-block structures can update

This commit is contained in:
Dave Smith committed 2019-03-04 19:34:09 -07:00
1 parent f05391062f
commit 2bd7bfce07
1 file changed
+6 -1
@@ -104,7 +104,12 @@ public class ItemBlockCardboardBox extends ItemBlock
stack.shrink(1);
}
world.setBlockState(pos, MekanismBlocks.CardboardBox.getStateFromMeta(1), 3);
// First, set the block to air to give the underlying block a chance to process
// any updates (esp. if it's a tile entity backed block). Ideally, we could avoid
// double updates, but if the block we are wrapping has multiple stacked blocks,
// we need to make sure it has a chance to update.
world.setBlockToAir(pos);
world.setBlockState(pos, MekanismBlocks.CardboardBox.getStateFromMeta(1));
isMonitoring = false;