Update to Minecraft 1.13-pre7

This commit is contained in:
md_5
2018-07-15 10:00:00 +10:00
parent 57ab4cfc6f
commit 421c1728c8
608 changed files with 17788 additions and 9378 deletions

View File

@@ -43,13 +43,22 @@ public class PerMaterialTest extends AbstractTestingBase {
public static List<Object[]> data() {
List<Object[]> list = Lists.newArrayList();
for (Material material : Material.values()) {
list.add(new Object[] {material});
if (!material.isLegacy()) {
list.add(new Object[] {material});
}
}
return list;
}
@Parameter public Material material;
@Test
public void isBlock() {
if (material != Material.AIR && material != Material.CAVE_AIR && material != Material.VOID_AIR) {
assertThat(material.isBlock(), is(not(CraftMagicNumbers.getBlock(material).getBlockData().isAir())));
}
}
@Test
public void isSolid() {
if (material == Material.AIR) {
@@ -106,7 +115,7 @@ public class PerMaterialTest extends AbstractTestingBase {
if (material == Material.AIR) {
assertTrue(material.isTransparent());
} else if (material.isBlock()) {
assertThat(material.isTransparent(), is(not(CraftMagicNumbers.getBlock(material).getBlockData().getMaterial().blocksLight())));
// assertThat(material.isTransparent(), is(not(CraftMagicNumbers.getBlock(material).getBlockData().getMaterial().blocksLight()))); // PAIL: not unit testable anymore (17w50a)
} else {
assertFalse(material.isTransparent());
}
@@ -163,6 +172,15 @@ public class PerMaterialTest extends AbstractTestingBase {
}
}
@Test
public void testDurability() {
if (!material.isBlock()) {
assertThat(material.getMaxDurability(), is((short) CraftMagicNumbers.getItem(material).getMaxDurability()));
} else {
assertThat(material.getMaxDurability(), is((short) 0));
}
}
@Test
public void testBlock() {
if (material == Material.AIR) {