Fork of Poseidon providing Bukkit #1060 to older Beta versions (b1.0-b1.7.3)
at develop 54 lines 1.4 kB view raw
1package net.minecraft.server; 2 3import java.util.Random; 4 5public class BlockLog extends Block { 6 7 protected BlockLog(int i) { 8 super(i, Material.WOOD); 9 this.textureId = 20; 10 } 11 12 public int a(Random random) { 13 return 1; 14 } 15 16 public int a(int i, Random random) { 17 return Block.LOG.id; 18 } 19 20 public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { 21 super.a(world, entityhuman, i, j, k, l); 22 } 23 24 public void remove(World world, int i, int j, int k) { 25 byte b0 = 4; 26 int l = b0 + 1; 27 28 if (world.a(i - l, j - l, k - l, i + l, j + l, k + l)) { 29 for (int i1 = -b0; i1 <= b0; ++i1) { 30 for (int j1 = -b0; j1 <= b0; ++j1) { 31 for (int k1 = -b0; k1 <= b0; ++k1) { 32 int l1 = world.getTypeId(i + i1, j + j1, k + k1); 33 34 if (l1 == Block.LEAVES.id) { 35 int i2 = world.getData(i + i1, j + j1, k + k1); 36 37 if ((i2 & 8) == 0) { 38 world.setRawData(i + i1, j + j1, k + k1, i2 | 8); 39 } 40 } 41 } 42 } 43 } 44 } 45 } 46 47 public int a(int i, int j) { 48 return i == 1 ? 21 : (i == 0 ? 21 : (j == 1 ? 116 : (j == 2 ? 117 : 20))); 49 } 50 51 protected int a_(int i) { 52 return i; 53 } 54}