@Override public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { super.onBlockAdded(worldIn, pos, state); TileEntity tileEntity = worldIn.getTileEntity(pos); if (tileEntity != null) { if (tileEntity instanceof TileEntityCargoLoader) { ((TileEntityCargoLoader) tileEntity).checkForCargoEntity(); } else if (tileEntity instanceof TileEntityCargoUnloader) { ((TileEntityCargoUnloader) tileEntity).checkForCargoEntity(); } } }
@Override public void onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state) { super.onBlockDestroyedByPlayer(worldIn, pos, state); for (int dX = -2; dX < 3; dX++) { for (int dZ = -2; dZ < 3; dZ++) { BlockPos newPos = new BlockPos(pos.getX() + dX, pos.getY(), pos.getZ() + dZ); final Block block = worldIn.getBlockState(newPos).getBlock(); if (block == GCBlocks.landingPadFull) { worldIn.markBlockForUpdate(newPos); } } } }