Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 32 lines 872 B view raw
1package net.minecraft.server; 2 3import java.util.Random; 4 5public class WorldGenDeadBush extends WorldGenerator { 6 7 private int a; 8 9 public WorldGenDeadBush(int i) { 10 this.a = i; 11 } 12 13 public boolean a(World world, Random random, int i, int j, int k) { 14 int l; 15 16 for (boolean flag = false; ((l = world.getTypeId(i, j, k)) == 0 || l == Block.LEAVES.id) && j > 0; --j) { 17 ; 18 } 19 20 for (int i1 = 0; i1 < 4; ++i1) { 21 int j1 = i + random.nextInt(8) - random.nextInt(8); 22 int k1 = j + random.nextInt(4) - random.nextInt(4); 23 int l1 = k + random.nextInt(8) - random.nextInt(8); 24 25 if (world.isEmpty(j1, k1, l1) && ((BlockFlower) Block.byId[this.a]).f(world, j1, k1, l1)) { 26 world.setRawTypeId(j1, k1, l1, this.a); 27 } 28 } 29 30 return true; 31 } 32}