diff options
Diffstat (limited to 'nms-patches/ContainerFurnace.patch')
-rw-r--r-- | nms-patches/ContainerFurnace.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/nms-patches/ContainerFurnace.patch b/nms-patches/ContainerFurnace.patch new file mode 100644 index 00000000..b299ee20 --- /dev/null +++ b/nms-patches/ContainerFurnace.patch @@ -0,0 +1,51 @@ +--- ../work/decompile-bb26c12b/net/minecraft/server/ContainerFurnace.java 2014-11-27 08:59:46.613422234 +1100 ++++ src/main/java/net/minecraft/server/ContainerFurnace.java 2014-11-27 08:42:10.116850981 +1100 +@@ -1,5 +1,10 @@ + package net.minecraft.server; + ++// CraftBukkit start ++import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace; ++import org.bukkit.craftbukkit.inventory.CraftInventoryView; ++// CraftBukkit end ++ + public class ContainerFurnace extends Container { + + private final IInventory furnace; +@@ -7,12 +12,29 @@ + private int g; + private int h; + private int i; ++ ++ // CraftBukkit start ++ private CraftInventoryView bukkitEntity = null; ++ private PlayerInventory player; ++ ++ @Override ++ public CraftInventoryView getBukkitView() { ++ if (bukkitEntity != null) { ++ return bukkitEntity; ++ } ++ ++ CraftInventoryFurnace inventory = new CraftInventoryFurnace((TileEntityFurnace) this.furnace); ++ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this); ++ return bukkitEntity; ++ } ++ // CraftBukkit end + + public ContainerFurnace(PlayerInventory playerinventory, IInventory iinventory) { + this.furnace = iinventory; + this.a(new Slot(iinventory, 0, 56, 17)); + this.a((Slot) (new SlotFurnaceFuel(iinventory, 1, 56, 53))); + this.a((Slot) (new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35))); ++ this.player = playerinventory; // CraftBukkit - save player + + int i; + +@@ -63,6 +85,7 @@ + } + + public boolean a(EntityHuman entityhuman) { ++ if (!this.checkReachable) return true; // CraftBukkit + return this.furnace.a(entityhuman); + } + |