diff options
Diffstat (limited to 'patches/server/0173-Add-ArmorStand-Item-Meta.patch')
-rw-r--r-- | patches/server/0173-Add-ArmorStand-Item-Meta.patch | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/patches/server/0173-Add-ArmorStand-Item-Meta.patch b/patches/server/0173-Add-ArmorStand-Item-Meta.patch index 609dc1f9e1..189bb53dc0 100644 --- a/patches/server/0173-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0173-Add-ArmorStand-Item-Meta.patch @@ -12,6 +12,19 @@ starting point for future additions in this area. Fixes GH-559 +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +index 662cf08d1cb2b41da5b17dae3585333cdf605c0b..f5bb5802aae64773252c9399df0fbe9de3d1d121 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +@@ -66,7 +66,7 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han + private Class<M> getItemMetaClass(Item item) { + ItemMeta meta = new ItemStack(this.asMaterial()).getItemMeta(); + if (meta != null) { +- if (CraftMetaEntityTag.class != meta.getClass() && CraftMetaArmorStand.class != meta.getClass()) { ++ if (CraftMetaEntityTag.class != meta.getClass()/* && CraftMetaArmorStand.class != meta.getClass()*/) { // Paper - CraftMetaArmorStand is implemented in the API via ArmorStandMeta. + return (Class<M>) meta.getClass().getInterfaces()[0]; + } + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..84e09a934600df116206df1c3922a11ee969901a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -255,10 +268,10 @@ index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..84e09a934600df116206df1c3922a11e + // Paper end } diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 482fcd5abe687accc770722778952e1fd199b471..cf436c9e62a11b8c6cbf7638de0e5635c67459ac 100644 +index 99a555ca72cd95d760d68072242203deeddd0ce1..a1d8da4e0de3f84194f28d7d18fa795d53714590 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -@@ -362,6 +362,7 @@ public class ItemMetaTest extends AbstractTestingBase { +@@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase { final CraftMetaArmorStand meta = (CraftMetaArmorStand) cleanStack.getItemMeta(); meta.entityTag = new CompoundTag(); meta.entityTag.putBoolean("Small", true); |