Fix a bunch of te's dropping contents on state change

This commit is contained in:
Vincent Lee committed 2019-11-11 13:06:45 -06:00
1 parent 0898173bb2
commit 9c0b4ceac9
10 files changed
+57 -56

No files matched your search

@@ -88,11 +88,11 @@ public class BlockSparkChanger extends BlockMod {
@Override
public void onReplaced(@Nonnull BlockState state, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull BlockState newState, boolean isMoving) {
TileSimpleInventory inv = (TileSimpleInventory) world.getTileEntity(pos);
InventoryHelper.dropInventory(inv, world, state, pos);
super.onReplaced(state, world, pos, newState, isMoving);
if (state.getBlock() != newState.getBlock()) {
TileSimpleInventory inv = (TileSimpleInventory) world.getTileEntity(pos);
InventoryHelper.dropInventory(inv, world, state, pos);
super.onReplaced(state, world, pos, newState, isMoving);
}
}
@Override