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/PlayerInventory.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/PlayerInventory.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerInventory.java | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java index 5b65b710..d63a4a4a 100644 --- a/src/main/java/net/minecraft/server/PlayerInventory.java +++ b/src/main/java/net/minecraft/server/PlayerInventory.java @@ -403,16 +403,12 @@ public class PlayerInventory implements IInventory { public int k() { int i = 0; - ItemStack[] aitemstack = this.armor; - int j = aitemstack.length; - for (int k = 0; k < j; ++k) { - ItemStack itemstack = aitemstack[k]; - - if (itemstack != null && itemstack.getItem() instanceof ItemArmor) { - int l = ((ItemArmor) itemstack.getItem()).b; + for (int j = 0; j < this.armor.length; ++j) { + if (this.armor[j] != null && this.armor[j].getItem() instanceof ItemArmor) { + int k = ((ItemArmor) this.armor[j].getItem()).b; - i += l; + i += k; } } @@ -470,30 +466,21 @@ public class PlayerInventory implements IInventory { return this.g; } - public boolean a(EntityHuman entityhuman) { + public boolean a_(EntityHuman entityhuman) { return this.player.dead ? false : entityhuman.e(this.player) <= 64.0D; } public boolean c(ItemStack itemstack) { - ItemStack[] aitemstack = this.armor; - int i = aitemstack.length; - - int j; - ItemStack itemstack1; + int i; - for (j = 0; j < i; ++j) { - itemstack1 = aitemstack[j]; - if (itemstack1 != null && itemstack1.doMaterialsMatch(itemstack)) { + for (i = 0; i < this.armor.length; ++i) { + if (this.armor[i] != null && this.armor[i].doMaterialsMatch(itemstack)) { return true; } } - aitemstack = this.items; - i = aitemstack.length; - - for (j = 0; j < i; ++j) { - itemstack1 = aitemstack[j]; - if (itemstack1 != null && itemstack1.doMaterialsMatch(itemstack)) { + for (i = 0; i < this.items.length; ++i) { + if (this.items[i] != null && this.items[i].doMaterialsMatch(itemstack)) { return true; } } |