mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-03 21:52:05 -07:00
SPIGOT-4214: Catch attempts to create BlockData for items
This commit is contained in:
@@ -51,6 +51,16 @@ public class BlockDataTest extends AbstractTestingBase {
|
||||
CraftBlockData.newData(Material.CAKE, cakeTest.toString());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testItem() {
|
||||
CraftBlockData.newData(Material.DIAMOND_AXE, null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testItemParse() {
|
||||
CraftBlockData.newData(null, "minecraft:diamond_axe");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClone() {
|
||||
Cake cakeTest = (Cake) CraftBlockData.fromData(Blocks.CAKE.getBlockData().set(BlockCake.BITES, 3));
|
||||
|
Reference in New Issue
Block a user