(World worldIn, BlockPos pos, IBlockState state, Random rand)
| 39 | } |
| 40 | |
| 41 | public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) |
| 42 | { |
| 43 | super.updateTick(worldIn, pos, state, rand); |
| 44 | |
| 45 | if (worldIn.getLightFromNeighbors(pos.up()) >= 9) |
| 46 | { |
| 47 | int i = state.getValue(AGE); |
| 48 | |
| 49 | if (i < 7) |
| 50 | { |
| 51 | float f = getGrowthChance(this, worldIn, pos); |
| 52 | |
| 53 | if (rand.nextInt((int)(25.0F / f) + 1) == 0) |
| 54 | { |
| 55 | worldIn.setBlockState(pos, state.withProperty(AGE, i + 1), 2); |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | public void grow(World worldIn, BlockPos pos, IBlockState state) |
| 62 | { |
nothing calls this directly
no test coverage detected