split out dropInventoryItems

This commit is contained in:
shedaniel committed 2020-06-09 19:17:56 +08:00
1 parent f35dbb4f99
commit f8ed1d845b
1 file changed
+5 -2
@@ -76,14 +76,17 @@ public abstract class InventoryBlock extends Block {
TileEntity tileentity = worldIn.getTileEntity(pos);
if (tileentity instanceof InventoryTileEntity) {
InventoryHelper.dropInventoryItems(worldIn, pos, (IInventory) tileentity);
dropInventoryItems(state, worldIn, pos, tileentity);
worldIn.updateComparatorOutputLevel(pos, this);
}
}
super.onReplaced(state, worldIn, pos, newState, isMoving);
}
protected void dropInventoryItems(BlockState state, World worldIn, BlockPos pos, TileEntity tileentity) {
InventoryHelper.dropInventoryItems(worldIn, pos, (IInventory) tileentity);
}
// BlockContainer sets this to invisible
// we need model for standard forge rendering
@Nonnull