diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-06 06:05:28 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-13 16:09:52 -0600 |
commit | 7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7 (patch) | |
tree | 843902ff94d82e86f40d7e0af1ac838fee859e75 /src/main/java/net/minecraft/server/ContainerAnvil.java | |
parent | a0c3b4f9d1b403fa64230f22b5dd3222181ba646 (diff) | |
download | craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.gz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.lz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.xz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.zip |
Update CraftBukkit to Minecraft 1.4.4.
Diffstat (limited to 'src/main/java/net/minecraft/server/ContainerAnvil.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ContainerAnvil.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java index 508f753b..eabc7b14 100644 --- a/src/main/java/net/minecraft/server/ContainerAnvil.java +++ b/src/main/java/net/minecraft/server/ContainerAnvil.java @@ -17,7 +17,7 @@ public class ContainerAnvil extends Container { private int i; private int j; private int k; - public int e = 0; + public int a = 0; private int l = 0; private String m; private final EntityHuman n; @@ -60,14 +60,14 @@ public class ContainerAnvil extends Container { public void d() { ItemStack itemstack = this.g.getItem(0); - this.e = 0; + this.a = 0; int i = 0; byte b0 = 0; int j = 0; if (itemstack == null) { this.f.setItem(0, (ItemStack) null); - this.e = 0; + this.a = 0; } else { ItemStack itemstack1 = itemstack.cloneItemStack(); ItemStack itemstack2 = this.g.getItem(1); @@ -87,7 +87,7 @@ public class ContainerAnvil extends Container { l = Math.min(itemstack1.i(), itemstack1.k() / 4); if (l <= 0) { this.f.setItem(0, (ItemStack) null); - this.e = 0; + this.a = 0; return; } @@ -102,7 +102,7 @@ public class ContainerAnvil extends Container { } else { if (itemstack1.id != itemstack2.id || !itemstack1.f()) { this.f.setItem(0, (ItemStack) null); - this.e = 0; + this.a = 0; return; } @@ -240,17 +240,17 @@ public class ContainerAnvil extends Container { } } - this.e = k + i; + this.a = k + i; if (i <= 0) { itemstack1 = null; } - if (j == i && j > 0 && this.e >= 40) { + if (j == i && j > 0 && this.a >= 40) { //System.out.println("Naming an item only, cost too high; giving discount to cap cost to 39 levels"); // CraftBukkit -remove debug - this.e = 39; + this.a = 39; } - if (this.e >= 40 && !this.n.abilities.canInstantlyBuild) { + if (this.a >= 40 && !this.n.abilities.canInstantlyBuild) { itemstack1 = null; } @@ -261,7 +261,7 @@ public class ContainerAnvil extends Container { } if (itemstack1.s()) { - i1 -= 5; + i1 -= 9; } if (i1 < 0) { @@ -280,11 +280,11 @@ public class ContainerAnvil extends Container { public void addSlotListener(ICrafting icrafting) { super.addSlotListener(icrafting); - icrafting.setContainerData(this, 0, this.e); + icrafting.setContainerData(this, 0, this.a); } - public void a(EntityHuman entityhuman) { - super.a(entityhuman); + public void b(EntityHuman entityhuman) { + super.b(entityhuman); if (!this.h.isStatic) { for (int i = 0; i < this.g.getSize(); ++i) { ItemStack itemstack = this.g.splitWithoutUpdate(i); @@ -296,14 +296,14 @@ public class ContainerAnvil extends Container { } } - public boolean c(EntityHuman entityhuman) { + public boolean a(EntityHuman entityhuman) { if (!this.checkReachable) return true; // CraftBukkit return this.h.getTypeId(this.i, this.j, this.k) != Block.ANVIL.id ? false : entityhuman.e((double) this.i + 0.5D, (double) this.j + 0.5D, (double) this.k + 0.5D) <= 64.0D; } public ItemStack b(EntityHuman entityhuman, int i) { ItemStack itemstack = null; - Slot slot = (Slot) this.b.get(i); + Slot slot = (Slot) this.c.get(i); if (slot != null && slot.d()) { ItemStack itemstack1 = slot.getItem(); |