public override void UpdateTick(net.minecraft.src.World world, int i, int j, int k, SharpBukkitLive.SharpBukkit.SharpRandom random) { if (world.singleplayerWorld) { return; } if (world.GetBlockLightValue(i, j + 1, k) < 4 && net.minecraft.src.Block.lightOpacity [world.GetBlockId(i, j + 1, k)] > 2) { if (random.Next(4) != 0) { return; } world.SetBlockWithNotify(i, j, k, net.minecraft.src.Block.DIRT.ID); } else { if (world.GetBlockLightValue(i, j + 1, k) >= 9) { int l = (i + random.Next(3)) - 1; int i1 = (j + random.Next(5)) - 3; int j1 = (k + random.Next(3)) - 1; int k1 = world.GetBlockId(l, i1 + 1, j1); if (world.GetBlockId(l, i1, j1) == net.minecraft.src.Block.DIRT.ID && world. GetBlockLightValue(l, i1 + 1, j1) >= 4 && net.minecraft.src.Block.lightOpacity[k1 ] <= 2) { world.SetBlockWithNotify(l, i1, j1, net.minecraft.src.Block.GRASS.ID); } } } }
public override void UpdateTick(net.minecraft.src.World world, int i, int j, int k, SharpBukkitLive.SharpBukkit.SharpRandom random) { base.UpdateTick(world, i, j, k, random); if (world.GetBlockLightValue(i, j + 1, k) >= 9) { int l = world.GetBlockMetadata(i, j, k); if (l < 7) { float f = GetGrowthRate(world, i, j, k); if (random.Next((int)(100F / f)) == 0) { l++; world.SetBlockMetadataWithNotify(i, j, k, l); } } } }
public override void UpdateTick(net.minecraft.src.World world, int i, int j, int k, SharpBukkitLive.SharpBukkit.SharpRandom random) { if (world.singleplayerWorld) { return; } base.UpdateTick(world, i, j, k, random); if (world.GetBlockLightValue(i, j + 1, k) >= 9 && random.Next(30) == 0) { int l = world.GetBlockMetadata(i, j, k); if ((l & 8) == 0) { world.SetBlockMetadataWithNotify(i, j, k, l | 8); } else { GrowTree(world, i, j, k, random); } } }