summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-12-02 09:29:33 +1100
committermd_5 <git@md-5.net>2016-12-02 09:29:33 +1100
commitb6ad714e853042def52620befe9bc85d0137cd71 (patch)
tree88c4943eb76a566534e0e96b46b32281c6cfb9d2 /nms-patches
parent4d99feddd02b4402a9c6fe9514525e0534a3135d (diff)
downloadcraftbukkit-b6ad714e853042def52620befe9bc85d0137cd71.tar
craftbukkit-b6ad714e853042def52620befe9bc85d0137cd71.tar.gz
craftbukkit-b6ad714e853042def52620befe9bc85d0137cd71.tar.lz
craftbukkit-b6ad714e853042def52620befe9bc85d0137cd71.tar.xz
craftbukkit-b6ad714e853042def52620befe9bc85d0137cd71.zip
SPIGOT-2871: Improve BlockStates + BlockStateMeta
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ContainerEnchantTable.patch14
-rw-r--r--nms-patches/ItemReed.patch11
2 files changed, 16 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;
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;