diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-10-24 22:53:23 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-10-27 22:19:03 -0400 |
commit | 60819c6693daf19dde68b04af38a4fee8c7da988 (patch) | |
tree | e7bd96a07f0e9d9f1f6b2721ddd1bb5dd71eaf48 /src/main/java/net/minecraft/server/ContainerPlayer.java | |
parent | b9a72531b6e2ccc84bd021bca421255a957d96f7 (diff) | |
download | craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar.gz craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar.lz craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.tar.xz craftbukkit-60819c6693daf19dde68b04af38a4fee8c7da988.zip |
Update CraftBukkit to Minecraft 1.4(.2).
Diffstat (limited to 'src/main/java/net/minecraft/server/ContainerPlayer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ContainerPlayer.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/main/java/net/minecraft/server/ContainerPlayer.java b/src/main/java/net/minecraft/server/ContainerPlayer.java index 121663fa..707cccb4 100644 --- a/src/main/java/net/minecraft/server/ContainerPlayer.java +++ b/src/main/java/net/minecraft/server/ContainerPlayer.java @@ -7,25 +7,22 @@ import org.bukkit.craftbukkit.inventory.CraftInventoryView; public class ContainerPlayer extends Container { - public InventoryCrafting craftInventory; - public IInventory resultInventory; - public boolean g; + public InventoryCrafting craftInventory = new InventoryCrafting(this, 2, 2); + public IInventory resultInventory = new InventoryCraftResult(); + public boolean g = false; + private final EntityHuman h; // CraftBukkit start private CraftInventoryView bukkitEntity = null; private PlayerInventory player; // CraftBukkit end - public ContainerPlayer(PlayerInventory playerinventory) { - this(playerinventory, true); - } - - public ContainerPlayer(PlayerInventory playerinventory, boolean flag) { + public ContainerPlayer(PlayerInventory playerinventory, boolean flag, EntityHuman entityhuman) { + this.g = flag; + this.h = entityhuman; this.resultInventory = new InventoryCraftResult(); // CraftBukkit - moved to before InventoryCrafting construction this.craftInventory = new InventoryCrafting(this, 2, 2, playerinventory.player); // CraftBukkit - pass player this.craftInventory.resultInventory = this.resultInventory; // CraftBukkit - let InventoryCrafting know about its result slot this.player = playerinventory; // CraftBukkit - save player - this.g = false; - this.g = flag; this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 144, 36))); int i; @@ -57,7 +54,7 @@ public class ContainerPlayer extends Container { public void a(IInventory iinventory) { // CraftBukkit start (Note: the following line would cause an error if called during construction) CraftingManager.getInstance().lastCraftView = getBukkitView(); - ItemStack craftResult = CraftingManager.getInstance().craft(this.craftInventory); + ItemStack craftResult = CraftingManager.getInstance().craft(this.craftInventory, this.h.world); this.resultInventory.setItem(0, craftResult); if (super.listeners.size() < 1) { return; @@ -86,7 +83,7 @@ public class ContainerPlayer extends Container { return true; } - public ItemStack b(int i) { + public ItemStack b(EntityHuman entityhuman, int i) { ItemStack itemstack = null; Slot slot = (Slot) this.b.get(i); @@ -136,7 +133,7 @@ public class ContainerPlayer extends Container { return null; } - slot.b(itemstack1); + slot.a(entityhuman, itemstack1); } return itemstack; |