summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/BlockLeaves.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockLeaves.java')
-rw-r--r--src/main/java/net/minecraft/server/BlockLeaves.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java
index 7e1f258c..a0672562 100644
--- a/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -126,7 +126,7 @@ public class BlockLeaves extends BlockLeavesBase {
if (event.isCancelled()) return;
// CraftBukkit end
- this.b_(world, i, j, k, world.getData(i, j, k));
+ this.g(world, i, j, k, world.getData(i, j, k));
world.setTypeId(i, j, k, 0);
}
@@ -138,7 +138,16 @@ public class BlockLeaves extends BlockLeavesBase {
return Block.SAPLING.id;
}
- protected int b(int i) {
+ public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
+ if (!world.isStatic && entityhuman.G() != null && entityhuman.G().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 {
+ super.a(world, entityhuman, i, j, k, l);
+ }
+ }
+
+ protected int a_(int i) {
return i & 3;
}