fix: fixed containers not having loot
@@ -174,13 +174,15 @@ public class ForgedContainerBlock extends TetraWaterloggedBlock implements IInte
@Override
public void onReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) {
- // only drop loot from open, master/unflipped chests
+ if (!equals(newState.getBlock())) {
+ // only drop loot from open, primary/unflipped chests
if (state.get(openProp) && !state.get(flippedProp)) {
dropBlockInventory(this, world, pos, newState);
} else {
TileEntityOptional.from(world, pos, ForgedContainerTile.class).ifPresent(TileEntity::remove);
}
}
+ }
@Override
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
