3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 20:40:08 +01:00

Test cloning of CraftItemStacks created with null nms ItemStacks

Dieser Commit ist enthalten in:
Andrew Ardill 2011-12-29 22:42:47 +11:00
Ursprung 8b735bf47a
Commit 5124f8f462

Datei anzeigen

@ -25,4 +25,12 @@ public class CraftItemStackTest {
assert (clone.getTypeId() == itemStack.getTypeId());
assert (clone.getData().equals(itemStack.getData()));
}
@Test
public void testCloneNullItem() throws Exception {
net.minecraft.server.ItemStack nmsItemStack = null;
ItemStack itemStack = new CraftItemStack(nmsItemStack);
ItemStack clone = itemStack.clone();
assert (clone.equals(itemStack));
}
}