mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 14:33:56 +01:00
51 lines
1.6 KiB
Diff
51 lines
1.6 KiB
Diff
--- a/net/minecraft/server/ContainerFurnace.java
|
|
+++ b/net/minecraft/server/ContainerFurnace.java
|
|
@@ -1,6 +1,10 @@
|
|
package net.minecraft.server;
|
|
|
|
import javax.annotation.Nullable;
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
|
+// CraftBukkit end
|
|
|
|
public class ContainerFurnace extends Container {
|
|
|
|
@@ -10,11 +14,28 @@
|
|
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;
|
|
|
|
@@ -65,6 +86,7 @@
|
|
}
|
|
|
|
public boolean a(EntityHuman entityhuman) {
|
|
+ if (!this.checkReachable) return true; // CraftBukkit
|
|
return this.furnace.a(entityhuman);
|
|
}
|
|
|