Delegate ItemStack (#10852)
This commit is contained in:
parent
13992b17c7
commit
bf8552f0f0
8 changed files with 1611 additions and 20 deletions
|
@ -25,10 +25,10 @@ index a71717fe99e78c480747cc61ab30b53b6667fde7..080ab25d3585552c1abd62a9992d48bf
|
|||
@Override
|
||||
diff --git a/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java b/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6b8d360ef86e181a680ad77f28b7dd7368dddfe7
|
||||
index 0000000000000000000000000000000000000000..9f8abe2376f16aeffe4e9f90a2da04b7e3a55429
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java
|
||||
@@ -0,0 +1,48 @@
|
||||
@@ -0,0 +1,41 @@
|
||||
+package io.papermc.paper.util;
|
||||
+
|
||||
+import org.bukkit.Material;
|
||||
|
@ -69,11 +69,4 @@ index 0000000000000000000000000000000000000000..6b8d360ef86e181a680ad77f28b7dd73
|
|||
+
|
||||
+ assertFalse(diamond.canRepair(new ItemStack(Material.OAK_BUTTON)), "diamond can repair oak button");
|
||||
+ }
|
||||
+
|
||||
+ @Test
|
||||
+ public void testInvalidItem() {
|
||||
+ ItemStack badItemStack = new ItemStack(Material.ACACIA_WALL_SIGN);
|
||||
+
|
||||
+ assertFalse(badItemStack.isRepairableBy(new ItemStack(Material.DIAMOND)), "acacia wall sign is repairable by diamond");
|
||||
+ }
|
||||
+}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue