summaryrefslogtreecommitdiffstats
path: root/nms-patches/ContainerWorkbench.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ContainerWorkbench.patch')
-rw-r--r--nms-patches/ContainerWorkbench.patch13
1 files changed, 6 insertions, 7 deletions
diff --git a/nms-patches/ContainerWorkbench.patch b/nms-patches/ContainerWorkbench.patch
index d2b2757c..38991fa5 100644
--- a/nms-patches/ContainerWorkbench.patch
+++ b/nms-patches/ContainerWorkbench.patch
@@ -1,14 +1,13 @@
--- a/net/minecraft/server/ContainerWorkbench.java
+++ b/net/minecraft/server/ContainerWorkbench.java
-@@ -1,15 +1,29 @@
+@@ -1,13 +1,28 @@
package net.minecraft.server;
- import javax.annotation.Nullable;
+// CraftBukkit start
+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
+// CraftBukkit end
-
++
public class ContainerWorkbench extends Container {
- public InventoryCrafting craftInventory = new InventoryCrafting(this, 3, 3);
@@ -32,7 +31,7 @@
this.g = world;
this.h = blockposition;
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35)));
-@@ -37,7 +51,21 @@
+@@ -35,7 +50,21 @@
}
public void a(IInventory iinventory) {
@@ -55,15 +54,15 @@
}
public void b(EntityHuman entityhuman) {
-@@ -55,6 +83,7 @@
+@@ -53,6 +82,7 @@
}
public boolean a(EntityHuman entityhuman) {
+ if (!this.checkReachable) return true; // CraftBukkit
- return this.g.getType(this.h).getBlock() != Blocks.CRAFTING_TABLE ? false : entityhuman.e((double) this.h.getX() + 0.5D, (double) this.h.getY() + 0.5D, (double) this.h.getZ() + 0.5D) <= 64.0D;
+ return this.g.getType(this.h).getBlock() != Blocks.CRAFTING_TABLE ? false : entityhuman.d((double) this.h.getX() + 0.5D, (double) this.h.getY() + 0.5D, (double) this.h.getZ() + 0.5D) <= 64.0D;
}
-@@ -104,4 +133,17 @@
+@@ -106,4 +136,17 @@
public boolean a(ItemStack itemstack, Slot slot) {
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
}