Fix VanillaMobGoalTest#testBukkitMap (#5390)

This commit is contained in:
Jason Penilla 2021-03-19 15:21:54 -07:00
parent 93ce0f3a89
commit 6d452f1f7f

View file

@ -1074,6 +1074,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
@ -1150,9 +1151,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @Test
+ public void testBukkitMap() {
+ List<Class<?>> classes;
+ try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("net.minecraft.server").scan()) {
+ classes = scanResult.getSubclasses("net.minecraft.server.EntityInsentient").loadClasses();
+ try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("net.minecraft.world.entity").scan()) {
+ classes = scanResult.getSubclasses("net.minecraft.world.entity.EntityInsentient").loadClasses();
+ }
+ Assert.assertNotEquals("There are supposed to be more than 0 entity types!", Collections.emptyList(), classes);
+
+ boolean shouldFail = false;
+ for (Class<?> nmsClass : classes) {