summaryrefslogtreecommitdiffstats
path: root/nms-patches/ContainerEnchantTable.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/ContainerEnchantTable.patch')
-rw-r--r--nms-patches/ContainerEnchantTable.patch14
1 files changed, 5 insertions, 9 deletions
diff --git a/nms-patches/ContainerEnchantTable.patch b/nms-patches/ContainerEnchantTable.patch
index 4abd722f..17a1beb0 100644
--- a/nms-patches/ContainerEnchantTable.patch
+++ b/nms-patches/ContainerEnchantTable.patch
@@ -1,13 +1,12 @@
--- a/net/minecraft/server/ContainerEnchantTable.java
+++ b/net/minecraft/server/ContainerEnchantTable.java
-@@ -3,9 +3,22 @@
+@@ -3,6 +3,17 @@
import java.util.List;
import java.util.Random;
+// CraftBukkit start
+import java.util.Map;
+import org.bukkit.Location;
-+
+import org.bukkit.craftbukkit.inventory.CraftInventoryEnchanting;
+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -18,21 +17,18 @@
+
public class ContainerEnchantTable extends Container {
-- public IInventory enchantSlots = new InventorySubcontainer("Enchant", true, 2) {
-+ // CraftBukkit - make type specific (changed from IInventory)
-+ public InventorySubcontainer enchantSlots = new InventorySubcontainer("Enchant", true, 2) {
- public int getMaxStackSize() {
- return 64;
- }
-@@ -14,6 +27,11 @@
+ public IInventory enchantSlots = new InventorySubcontainer("Enchant", true, 2) {
+@@ -14,6 +25,13 @@
super.update();
ContainerEnchantTable.this.a((IInventory) this);
}
+
++ // CraftBukkit start
+ @Override
+ public Location getLocation() {
+ return new org.bukkit.Location(world.getWorld(), position.getX(), position.getY(), position.getZ());
+ }
++ // CraftBukkit end
};
public World world;
private final BlockPosition position;