aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch
new file mode 100644
index 0000000000..6f85526956
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch
@@ -0,0 +1,42 @@
+--- a/net/minecraft/world/inventory/ShulkerBoxMenu.java
++++ b/net/minecraft/world/inventory/ShulkerBoxMenu.java
+@@ -6,20 +6,30 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
++
+ public class ShulkerBoxMenu extends AbstractContainerMenu {
+
+ private static final int CONTAINER_SIZE = 27;
+ private final Container container;
++ // CraftBukkit start
++ private CraftInventoryView bukkitEntity;
++ private Inventory player;
+
+ public ShulkerBoxMenu(int i, Inventory inventory) {
+ this(i, inventory, new SimpleContainer(27));
+ }
++ // CraftBukkit end
+
+ public ShulkerBoxMenu(int i, Inventory inventory, Container container) {
+ super(MenuType.SHULKER_BOX, i);
+ checkContainerSize(container, 27);
+ this.container = container;
+- container.startOpen(inventory.player);
++ this.player = playerInventory; // CraftBukkit - save player
++ container.startOpen(playerInventory.player);
+ boolean flag = true;
+ boolean flag1 = true;
+
+@@ -47,6 +66,7 @@
+ @Override
+ @Override
+ public boolean stillValid(Player player) {
++ if (!this.checkReachable) return true; // CraftBukkit
+ return this.container.stillValid(player);
+ }
+