Update to Minecraft 1.13-pre7

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2018-07-15 10:00:00 +10:00
parent debc7172fd
commit 767e4f6ccf
199 changed files with 8301 additions and 3637 deletions

View File

@@ -14,31 +14,6 @@ public class MaterialTest {
}
}
@Test
public void getById() throws Throwable {
for (Material material : Material.values()) {
if (material.getClass().getField(material.name()).getAnnotation(Deprecated.class) != null) {
continue;
}
assertThat(Material.getMaterial(material.getId()), is(material));
}
}
@Test
public void isBlock() {
for (Material material : Material.values()) {
if (material.getId() > 255) continue;
assertTrue(String.format("[%d] %s", material.getId(), material.toString()), material.isBlock());
}
}
@Test
public void getByOutOfRangeId() {
assertThat(Material.getMaterial(Integer.MAX_VALUE), is(nullValue()));
assertThat(Material.getMaterial(Integer.MIN_VALUE), is(nullValue()));
}
@Test
public void getByNameNull() {
assertThat(Material.getMaterial(null), is(nullValue()));
@@ -47,6 +22,9 @@ public class MaterialTest {
@Test
public void getData() {
for (Material material : Material.values()) {
if (!material.isLegacy()) {
continue;
}
Class<? extends MaterialData> clazz = material.getData();
assertThat(material.getNewData((byte) 0), is(instanceOf(clazz)));
@@ -58,16 +36,6 @@ public class MaterialTest {
Material.matchMaterial(null);
}
@Test
public void matchMaterialById() throws Throwable {
for (Material material : Material.values()) {
if (material.getClass().getField(material.name()).getAnnotation(Deprecated.class) != null) {
continue;
}
assertThat(Material.matchMaterial(String.valueOf(material.getId())), is(material));
}
}
@Test
public void matchMaterialByName() {
for (Material material : Material.values()) {