diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-13 17:33:27 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-15 13:28:59 -0500 |
commit | 83d29e461c85733f0113b6eb19db6e3b42da2949 (patch) | |
tree | b3063a1c28f478ab368d5ba3413a842def68c28f /src/main/java/net/minecraft/server/BlockStem.java | |
parent | ba6e4c38cfa98ad291974195cc46d70a4f138ac1 (diff) | |
download | craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.gz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.lz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.tar.xz craftbukkit-83d29e461c85733f0113b6eb19db6e3b42da2949.zip |
Update CraftBukkit to Minecraft 1.5
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockStem.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockStem.java | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java index ff1b89fa..8339a352 100644 --- a/src/main/java/net/minecraft/server/BlockStem.java +++ b/src/main/java/net/minecraft/server/BlockStem.java @@ -6,10 +6,10 @@ import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit public class BlockStem extends BlockFlower { - private Block blockFruit; + private final Block blockFruit; protected BlockStem(int i, Block block) { - super(i, 111); + super(i); this.blockFruit = block; this.b(true); float f = 0.125F; @@ -18,21 +18,20 @@ public class BlockStem extends BlockFlower { this.a((CreativeModeTab) null); } - protected boolean d_(int i) { + protected boolean f_(int i) { return i == Block.SOIL.id; } - public void b(World world, int i, int j, int k, Random random) { - super.b(world, i, j, k, random); + public void a(World world, int i, int j, int k, Random random) { + super.a(world, i, j, k, random); if (world.getLightLevel(i, j + 1, k) >= 9) { - float f = this.n(world, i, j, k); + float f = this.m(world, i, j, k); if (random.nextInt((int) (25.0F / f) + 1) == 0) { int l = world.getData(i, j, k); if (l < 7) { - ++l; - CraftEventFactory.handleBlockGrowEvent(world, i, j, k, this.id, l); // CraftBukkit + CraftEventFactory.handleBlockGrowEvent(world, i, j, k, this.id, ++l); // CraftBukkit } else { if (world.getTypeId(i - 1, j, k) == this.blockFruit.id) { return; @@ -80,11 +79,17 @@ public class BlockStem extends BlockFlower { } } - public void l(World world, int i, int j, int k) { - world.setData(i, j, k, 7); + public void k(World world, int i, int j, int k) { + int l = world.getData(i, j, k) + MathHelper.nextInt(world.random, 2, 5); + + if (l > 7) { + l = 7; + } + + world.setData(i, j, k, l, 2); } - private float n(World world, int i, int j, int k) { + private float m(World world, int i, int j, int k) { float f = 1.0F; int l = world.getTypeId(i, j, k - 1); int i1 = world.getTypeId(i, j, k + 1); @@ -125,11 +130,7 @@ public class BlockStem extends BlockFlower { return f; } - public int a(int i, int j) { - return this.textureId; - } - - public void f() { + public void g() { float f = 0.125F; this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f); |