SPIGOT-5341: Add Material.isAir

This commit is contained in:
md_5 2019-10-06 18:41:56 +11:00
parent 683bae0670
commit 46351e1783

View File

@ -195,6 +195,15 @@ public class PerMaterialTest extends AbstractTestingBase {
}
}
@Test
public void testAir() {
if (material.isBlock()) {
assertThat(material.isAir(), is(equalTo(CraftMagicNumbers.getBlock(material).getBlockData().isAir())));
} else {
assertThat(material.isAir(), is(equalTo(false)));
}
}
@Test
public void testItem() {
if (material == Material.AIR) {