List of usage examples for net.minecraftforge.common ForgeHooks onCropsGrowPre
public static boolean onCropsGrowPre(World worldIn, BlockPos pos, BlockState state, boolean def)
From source file:com.plutomc.core.common.blocks.BlockCrocoite.java
License:Open Source License
@Override public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) { if (ForgeHooks.onCropsGrowPre(worldIn, pos, state, rand.nextInt(2) == 0)) { worldIn.setBlockState(pos, state.withProperty(GROWTH, state.getValue(GROWTH) + 1)); ForgeHooks.onCropsGrowPost(worldIn, pos, state, worldIn.getBlockState(pos)); }//from ww w. ja v a 2 s .c o m }