diff options
author | Erik Broes <erikbroes@grum.nl> | 2012-01-12 23:10:13 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2012-01-12 23:10:13 +0100 |
commit | 7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee (patch) | |
tree | a1ca024b03aadf4b687f442b33bf713aecd511f7 /src/main/java/net/minecraft/server/BlockLeaves.java | |
parent | dd5ef8725c699e0b2946dc0f6d523ca482404043 (diff) | |
download | craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar.gz craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar.lz craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.tar.xz craftbukkit-7219d4dd858b405f34ea66c67f8ab7d4c07fb4ee.zip |
Updated to Minecraft 1.1
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockLeaves.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockLeaves.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java index b0e21b3e..1538397a 100644 --- a/src/main/java/net/minecraft/server/BlockLeaves.java +++ b/src/main/java/net/minecraft/server/BlockLeaves.java @@ -138,8 +138,15 @@ public class BlockLeaves extends BlockTransparant { return Block.SAPLING.id; } + public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) { + super.dropNaturally(world, i, j, k, l, f, i1); + if (!world.isStatic && (l & 3) == 0 && world.random.nextInt(200) == 0) { + this.a(world, i, j, k, new ItemStack(Item.APPLE, 1, 0)); + } + } + public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { - if (!world.isStatic && entityhuman.P() != null && entityhuman.P().id == Item.SHEARS.id) { + if (!world.isStatic && entityhuman.Q() != null && entityhuman.Q().id == Item.SHEARS.id) { entityhuman.a(StatisticList.C[this.id], 1); this.a(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3)); } else { |