private boolean onApplyBonemeal(ItemStack stack, World world, BlockPos pos, EntityPlayer player, EnumHand hand, int radius) {
IBlockState state = world.getBlockState(pos);
int hook = ForgeEventFactory.onApplyBonemeal(player, world, pos, state, stack, hand);
if (hook != 0) {
return hook > 0;
}
boolean used = false;
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();
BlockPos pos2;
for (int i = x - radius; i <= x + radius; i++) {
for (int k = z - radius; k <= z + radius; k++) {
pos2 = new BlockPos(i, y, k);
used |= growBlock(world, pos2, world.getBlockState(pos2));
}
}
if (used) {
stack.shrink(1);
}
return used;
}