Advertisement
tahg

Untitled

Sep 10th, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. public void a(World world, int i, int j, int k, Random random) {
  2. if (!world.isStatic) {
  3. if (world.getLightLevel(i, j + 1, k) < 4 && Block.q[world.getTypeId(i, j + 1, k)] > 2) {
  4. if (random.nextInt(4) != 0) {
  5. queueBlockTick(world, x, y, z);
  6. return;
  7. }
  8.  
  9. world.setTypeId(i, j, k, Block.DIRT.id);
  10. } else if (world.getLightLevel(i, j + 1, k) >= 9) {
  11. int l = i + random.nextInt(3) - 1;
  12. // int i1 = j + random.nextInt(5) - 3; // CraftBukkit
  13. int j1 = k + random.nextInt(3) - 1;
  14.  
  15. // CraftBukkit start
  16. for (int i1 = j + 1; i1 >= j - 3; i1--) {
  17. int k1 = world.getTypeId(l, i1 + 1, j1);
  18. if (world.getTypeId(l, i1, j1) == Block.DIRT.id && world.getLightLevel(l, i1 + 1, j1) >= 4 && Block.q[k1] <= 2) {
  19. world.setTypeId(l, i1, j1, Block.GRASS.id);
  20. queueBlockTick(world, l, i1, j1);
  21. return;
  22. }
  23. }
  24. queueBlockTick(world, x, y, z);
  25. // CraftBukkit end
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement