mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
--- a/net/minecraft/server/ContainerBrewingStand.java
|
|
+++ b/net/minecraft/server/ContainerBrewingStand.java
|
|
@@ -1,5 +1,10 @@
|
|
package net.minecraft.server;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
|
|
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
|
|
+// CraftBukkit end
|
|
+
|
|
public class ContainerBrewingStand extends Container {
|
|
|
|
private IInventory brewingStand;
|
|
@@ -7,7 +12,13 @@
|
|
private int g;
|
|
private int h;
|
|
|
|
+ // CraftBukkit start
|
|
+ private CraftInventoryView bukkitEntity = null;
|
|
+ private PlayerInventory player;
|
|
+ // CraftBukkit end
|
|
+
|
|
public ContainerBrewingStand(PlayerInventory playerinventory, IInventory iinventory) {
|
|
+ player = playerinventory; // CraftBukkit
|
|
this.brewingStand = iinventory;
|
|
this.a((Slot) (new ContainerBrewingStand.SlotPotionBottle(playerinventory.player, iinventory, 0, 56, 51)));
|
|
this.a((Slot) (new ContainerBrewingStand.SlotPotionBottle(playerinventory.player, iinventory, 1, 79, 58)));
|
|
@@ -54,6 +65,7 @@
|
|
}
|
|
|
|
public boolean a(EntityHuman entityhuman) {
|
|
+ if (!this.checkReachable) return true; // CraftBukkit
|
|
return this.brewingStand.a(entityhuman);
|
|
}
|
|
|
|
@@ -182,4 +194,17 @@
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ // CraftBukkit start
|
|
+ @Override
|
|
+ public CraftInventoryView getBukkitView() {
|
|
+ if (bukkitEntity != null) {
|
|
+ return bukkitEntity;
|
|
+ }
|
|
+
|
|
+ CraftInventoryBrewer inventory = new CraftInventoryBrewer(this.brewingStand);
|
|
+ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
|
|
+ return bukkitEntity;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|