diff options
author | Nassim Jahnke <[email protected]> | 2024-04-28 14:20:52 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-04-28 14:20:52 +0200 |
commit | 1a03cc9b60d08da8ecf042e48bc0ca8fb24b5bfb (patch) | |
tree | 2a9f882a24fc20434568e429f6713965866f495b /patches/server/1045-General-ItemMeta-fixes.patch | |
parent | 306b203c2d06979e94eeab36d21c6a9596254d56 (diff) | |
download | Paper-1a03cc9b60d08da8ecf042e48bc0ca8fb24b5bfb.tar.gz Paper-1a03cc9b60d08da8ecf042e48bc0ca8fb24b5bfb.zip |
Fix test compilation
Diffstat (limited to 'patches/server/1045-General-ItemMeta-fixes.patch')
-rw-r--r-- | patches/server/1045-General-ItemMeta-fixes.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/patches/server/1045-General-ItemMeta-fixes.patch b/patches/server/1045-General-ItemMeta-fixes.patch index 058a497055..71fe5d1c86 100644 --- a/patches/server/1045-General-ItemMeta-fixes.patch +++ b/patches/server/1045-General-ItemMeta-fixes.patch @@ -128,3 +128,38 @@ index c769d2a210060f6829a6cbe739d6d9ab2f602644..1feffe289a1e714084bd37b5c5ad23a3 } } +diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java +index 0b11d5ea89539decd2f6c60c5b581bbd78ff1fd6..74ebadacbbd11b5a0d8f8c6cd6409cce17cfa37d 100644 +--- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java ++++ b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java +@@ -92,7 +92,7 @@ public class DeprecatedItemMetaCustomValueTest extends AbstractTestingBase { + public void testNBTTagStoring() { + CraftMetaItem itemMeta = this.createComplexItemMeta(); + +- CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator(); ++ CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator() {}; // Paper + itemMeta.applyToItem(compound); + + assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper +diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java +index f3939074a886b20f17b00dd3c39833725f47d3f0..1123cc60671c1a48bba9b2baa1f10c6d5a6855fe 100644 +--- a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java ++++ b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java +@@ -126,7 +126,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase { + public void testNBTTagStoring() { + CraftMetaItem itemMeta = this.createComplexItemMeta(); + +- CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator(); ++ CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator() {}; // Paper + itemMeta.applyToItem(compound); + + assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper +@@ -472,7 +472,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase { + assertEquals(List.of(), container.get(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings())); + + // Write and read the entire container to NBT +- final CraftMetaItem.Applicator storage = new CraftMetaItem.Applicator(); ++ final CraftMetaItem.Applicator storage = new CraftMetaItem.Applicator() {}; // Paper + craftItem.applyToItem(storage); + + final CraftMetaItem readItem = new CraftMetaItem(storage.build(), null); // Paper |