From f8ed1d845bc100a63aef3d47dd66974ffb8f0a87 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Tue, 9 Jun 2020 19:17:56 +0800 Subject: [PATCH] split out dropInventoryItems --- .../java/slimeknights/mantle/block/InventoryBlock.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/slimeknights/mantle/block/InventoryBlock.java b/src/main/java/slimeknights/mantle/block/InventoryBlock.java index 5f0e584..1728f3b 100644 --- a/src/main/java/slimeknights/mantle/block/InventoryBlock.java +++ b/src/main/java/slimeknights/mantle/block/InventoryBlock.java @@ -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