From 08fe6d3c86f5798e4929d3853b6e626fc4fc6e1b Mon Sep 17 00:00:00 2001 From: MiniDigger Date: Wed, 16 Jun 2021 00:47:05 +0200 Subject: [PATCH] Fix a few cases of the vanilla mob goals --- patches/server/0428-Implement-Mob-Goal-API.patch | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/patches/server/0428-Implement-Mob-Goal-API.patch b/patches/server/0428-Implement-Mob-Goal-API.patch index 62f0839749..7d851a72c6 100644 --- a/patches/server/0428-Implement-Mob-Goal-API.patch +++ b/patches/server/0428-Implement-Mob-Goal-API.patch @@ -36,10 +36,10 @@ index 86cce7143abd317326cc755118bf61435e82e479..4233698d499b520dfc07c4184cefca63 diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java new file mode 100644 -index 0000000000000000000000000000000000000000..9efe7e29faf09901e8cde8713db80ceb31453412 +index 0000000000000000000000000000000000000000..dfc026d183adab1dde5942f36e7a281b3a2fc699 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java -@@ -0,0 +1,463 @@ +@@ -0,0 +1,467 @@ +package com.destroystokyo.paper.entity.ai; + +import com.destroystokyo.paper.entity.RangedEntity; @@ -279,6 +279,8 @@ index 0000000000000000000000000000000000000000..9efe7e29faf09901e8cde8713db80ceb + + ignored.add("goal_selector_1"); + ignored.add("goal_selector_2"); ++ ignored.add("selector_1"); ++ ignored.add("selector_2"); + ignored.add("wrapped"); + + bukkitMap.put(net.minecraft.world.entity.Mob.class, Mob.class); @@ -396,6 +398,8 @@ index 0000000000000000000000000000000000000000..9efe7e29faf09901e8cde8713db80ceb + } + } + name = name.replace("PathfinderGoal", ""); ++ name = name.replace("TargetGoal", ""); ++ name = name.replace("Goal", ""); + StringBuilder sb = new StringBuilder(); + for (char c : name.toCharArray()) { + if (c >= 'A' && c <= 'Z') { @@ -937,7 +941,7 @@ index 130ab05393a7136020e06ec199256a031ba66091..8dd93620a770855450ed222dad6572e2 } 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 -index 0000000000000000000000000000000000000000..33597ba747c10bc9e2a89e6920f64ce5a737967e +index 0000000000000000000000000000000000000000..b2d510459bcf90a3611f3d91dae4ccc3d29b4079 --- /dev/null +++ b/src/test/java/com/destroystokyo/paper/entity/ai/VanillaMobGoalTest.java @@ -0,0 +1,105 @@