mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
Unit tests for Material.isItem
This commit is contained in:
parent
bd308430b5
commit
bdcc7c7b02
@ -162,4 +162,22 @@ public class PerMaterialTest extends AbstractTestingBase {
|
||||
assertFalse(EnchantmentTarget.BREAKABLE.includes(material));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBlock() {
|
||||
if (material == Material.AIR) {
|
||||
assertTrue(material.isBlock());
|
||||
} else {
|
||||
assertThat(material.isBlock(), is(equalTo(CraftMagicNumbers.getBlock(material) != Blocks.AIR)));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAir() {
|
||||
if (material == Material.AIR) {
|
||||
assertTrue(material.isItem());
|
||||
} else {
|
||||
assertThat(material.isItem(), is(equalTo(CraftMagicNumbers.getItem(material) != null)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user