mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-26 12:36:07 +01:00
Fix VanillaMobGoalTest#testBukkitMap (#5390)
This commit is contained in:
parent
18dbbb578e
commit
b748eb7b8f
@ -1060,10 +1060,10 @@ index 96652862531301c08aefa0baa79b1258b5b307ec..3014a5d71de98009bdc121ba690c3653
|
|||||||
}
|
}
|
||||||
diff --git a/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java
|
diff --git a/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..abc99e48f7d55e8faf1f317083146c76619e5f96
|
index 0000000000000000000000000000000000000000..c0525216a8469613c3e0d4b5774a82f69e70fb16
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java
|
+++ b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java
|
||||||
@@ -0,0 +1,102 @@
|
@@ -0,0 +1,104 @@
|
||||||
+package com.destroystokyo.paper.entity.ai;
|
+package com.destroystokyo.paper.entity.ai;
|
||||||
+
|
+
|
||||||
+import net.minecraft.world.entity.EntityInsentient;
|
+import net.minecraft.world.entity.EntityInsentient;
|
||||||
@ -1074,6 +1074,7 @@ index 0000000000000000000000000000000000000000..abc99e48f7d55e8faf1f317083146c76
|
|||||||
+import java.lang.reflect.Field;
|
+import java.lang.reflect.Field;
|
||||||
+import java.lang.reflect.Modifier;
|
+import java.lang.reflect.Modifier;
|
||||||
+import java.util.ArrayList;
|
+import java.util.ArrayList;
|
||||||
|
+import java.util.Collections;
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.stream.Collectors;
|
+import java.util.stream.Collectors;
|
||||||
+
|
+
|
||||||
@ -1150,9 +1151,10 @@ index 0000000000000000000000000000000000000000..abc99e48f7d55e8faf1f317083146c76
|
|||||||
+ @Test
|
+ @Test
|
||||||
+ public void testBukkitMap() {
|
+ public void testBukkitMap() {
|
||||||
+ List<Class<?>> classes;
|
+ List<Class<?>> classes;
|
||||||
+ try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("net.minecraft.server").scan()) {
|
+ try (ScanResult scanResult = new ClassGraph().enableAllInfo().whitelistPackages("net.minecraft.world.entity").scan()) {
|
||||||
+ classes = scanResult.getSubclasses("net.minecraft.server.EntityInsentient").loadClasses();
|
+ 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;
|
+ boolean shouldFail = false;
|
||||||
+ for (Class<?> nmsClass : classes) {
|
+ for (Class<?> nmsClass : classes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user