diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-04-20 19:05:14 +0200 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-04-20 19:05:14 +0200 |
commit | 483a878b8bcf1feb789cb5fd9374d0a060cc4d8a (patch) | |
tree | fb56faee3872a85282e2fa88235580589c826e45 /src/main/java/net/minecraft/server/InventoryCrafting.java | |
parent | ac9f297445a6116c5bb314b3be9f38520a58845e (diff) | |
download | craftbukkit-483a878b8bcf1feb789cb5fd9374d0a060cc4d8a.tar craftbukkit-483a878b8bcf1feb789cb5fd9374d0a060cc4d8a.tar.gz craftbukkit-483a878b8bcf1feb789cb5fd9374d0a060cc4d8a.tar.lz craftbukkit-483a878b8bcf1feb789cb5fd9374d0a060cc4d8a.tar.xz craftbukkit-483a878b8bcf1feb789cb5fd9374d0a060cc4d8a.zip |
Update for 1.4_00_01 -- if you bypassed Bukkit, you will most likely break.
Diffstat (limited to 'src/main/java/net/minecraft/server/InventoryCrafting.java')
-rw-r--r-- | src/main/java/net/minecraft/server/InventoryCrafting.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/net/minecraft/server/InventoryCrafting.java b/src/main/java/net/minecraft/server/InventoryCrafting.java index 5f0bae2e..e6411c16 100644 --- a/src/main/java/net/minecraft/server/InventoryCrafting.java +++ b/src/main/java/net/minecraft/server/InventoryCrafting.java @@ -2,59 +2,59 @@ package net.minecraft.server; public class InventoryCrafting implements IInventory { - private ItemStack[] a; + private ItemStack[] items; private int b; private Container c; // CraftBukkit start public ItemStack[] getContents() { - return a; + return items; } // CraftBukkit end public InventoryCrafting(Container container, int i, int j) { int k = i * j; - this.a = new ItemStack[k]; + this.items = new ItemStack[k]; this.c = container; this.b = i; } - public int q_() { - return this.a.length; + public int getSize() { + return this.items.length; } - public ItemStack c_(int i) { - return i >= this.q_() ? null : this.a[i]; + public ItemStack getItem(int i) { + return i >= this.getSize() ? null : this.items[i]; } public ItemStack b(int i, int j) { if (i >= 0 && i < this.b) { int k = i + j * this.b; - return this.c_(k); + return this.getItem(k); } else { return null; } } - public String c() { + public String getName() { return "Crafting"; } public ItemStack a(int i, int j) { - if (this.a[i] != null) { + if (this.items[i] != null) { ItemStack itemstack; - if (this.a[i].count <= j) { - itemstack = this.a[i]; - this.a[i] = null; + if (this.items[i].count <= j) { + itemstack = this.items[i]; + this.items[i] = null; this.c.a((IInventory) this); return itemstack; } else { - itemstack = this.a[i].a(j); - if (this.a[i].count == 0) { - this.a[i] = null; + itemstack = this.items[i].a(j); + if (this.items[i].count == 0) { + this.items[i] = null; } this.c.a((IInventory) this); @@ -65,16 +65,16 @@ public class InventoryCrafting implements IInventory { } } - public void a(int i, ItemStack itemstack) { - this.a[i] = itemstack; + public void setItem(int i, ItemStack itemstack) { + this.items[i] = itemstack; this.c.a((IInventory) this); } - public int r_() { + public int getMaxStackSize() { return 64; } - public void i() {} + public void update() {} public boolean a_(EntityHuman entityhuman) { return true; |