From b6ad714e853042def52620befe9bc85d0137cd71 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 2 Dec 2016 09:29:33 +1100 Subject: SPIGOT-2871: Improve BlockStates + BlockStateMeta --- nms-patches/ContainerEnchantTable.patch | 14 +++++--------- nms-patches/ItemReed.patch | 11 +++++++++++ 2 files changed, 16 insertions(+), 9 deletions(-) create mode 100644 nms-patches/ItemReed.patch (limited to 'nms-patches') 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; diff --git a/nms-patches/ItemReed.patch b/nms-patches/ItemReed.patch new file mode 100644 index 00000000..c3c66584 --- /dev/null +++ b/nms-patches/ItemReed.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/ItemReed.java ++++ b/net/minecraft/server/ItemReed.java +@@ -2,7 +2,7 @@ + + public class ItemReed extends Item { + +- private final Block a; ++ public final Block a; // PAIL: private->public + + public ItemReed(Block block) { + this.a = block; -- cgit v1.2.3