MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / updateTick

Method updateTick

src/main/java/net/minecraft/block/BlockCrops.java:41–59  ·  view source on GitHub ↗
(World worldIn, BlockPos pos, IBlockState state, Random rand)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 7

getGrowthChanceMethod · 0.95
getLightFromNeighborsMethod · 0.80
upMethod · 0.80
nextIntMethod · 0.80
getValueMethod · 0.65
withPropertyMethod · 0.65
setBlockStateMethod · 0.45

Tested by

no test coverage detected