private void doWork(TileEmcCapacitor emcCap) { for (int x = -4; x <= 4; x++) { for (int z = -4; z <= 4; z++) { if (!(Block.blocksList[worldObj.getBlockId(xCoord + x, yCoord, zCoord + z)] == Block.grass)) { if (ItemDye.applyBonemeal(new ItemStack(Item.dyePowder), worldObj, xCoord + x, yCoord, zCoord + z, FakePlayerFactory.getMinecraft(worldObj))) { emcCap.useEmc(new EmcValue(1.0F, EmcType.ESSENTIA), xCoord, yCoord, zCoord); } } } } }
public static boolean func_96604_a(ItemStack par0ItemStack, World par1World, int par2, int par3, int par4) { return applyBonemeal(par0ItemStack, par1World, par2, par3, par4, FakePlayerFactory.getMinecraft(par1World)); }
public static boolean TurtleCanBreakBlock(World world, int x, int y, int z){ BlockEvent event = new BlockEvent.BreakEvent(x,y,z,world, Block.blocksList[world.getBlockId(x,y,z)],world.getBlockMetadata(x,y,z), FakePlayerFactory.get( world, "[ComputerCraft]")); return !event.isCanceled(); }