@Override public void breakBlock(World world, int x, int y, int z, Block block, int meta) { if (!saveToItem()) { TileSMTInventory te = (TileSMTInventory) world.getTileEntity(x, y, z); for (int i = 0; i < te.getSizeInventory(); i++) { Utils.spawnItemInWorldWithRandomMotion(world, te.getStackInSlot(i), x, y, z); } } super.breakBlock(world, x, y, z, block, meta); }
@Override public boolean onBlockEventReceived(World world, int x, int y, int z, int side, int meta) { super.onBlockEventReceived(world, x, y, z, side, meta); TileEntity tileentity = world.getTileEntity(x, y, z); return tileentity != null ? tileentity.receiveClientEvent(side, meta) : false; }