summaryrefslogtreecommitdiffstats
path: root/nms-patches/ContainerShulkerBox.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ContainerShulkerBox.patch')
-rw-r--r--nms-patches/ContainerShulkerBox.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/nms-patches/ContainerShulkerBox.patch b/nms-patches/ContainerShulkerBox.patch
new file mode 100644
index 00000000..494f7c49
--- /dev/null
+++ b/nms-patches/ContainerShulkerBox.patch
@@ -0,0 +1,34 @@
+--- a/net/minecraft/server/ContainerShulkerBox.java
++++ b/net/minecraft/server/ContainerShulkerBox.java
+@@ -1,11 +1,31 @@
+ package net.minecraft.server;
+
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
++
+ public class ContainerShulkerBox extends Container {
+
+ private final IInventory a;
++ // CraftBukkit start
++ private CraftInventoryView bukkitEntity;
++ private PlayerInventory player;
++
++ @Override
++ public CraftInventoryView getBukkitView() {
++ if (bukkitEntity != null) {
++ return bukkitEntity;
++ }
++
++ bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), new CraftInventory(this.a), this);
++ return bukkitEntity;
++ }
++ // CraftBukkit end
+
+ public ContainerShulkerBox(PlayerInventory playerinventory, IInventory iinventory, EntityHuman entityhuman) {
+ this.a = iinventory;
++ this.player = playerinventory; // CraftBukkit - save player
+ iinventory.startOpen(entityhuman);
+ boolean flag = true;
+ boolean flag1 = true;