geforkt von Mirrors/Paper
allow nerfed mobs to jump again
Entity AI tasks are initialized earlier in recent versions of MC, this means that the fromMobSpawner has not been set at the point where AI tasks are initilazed and so the goalFloat will never be populated. To rectify this, we can rely on the entity tick checking if the mob is from a spawner each tick, and just initialize the field should the paper option be enabled. This saves us from having to modify the call chain in order to pass the fact that it was created by a mobSpawner earlier.
Dieser Commit ist enthalten in:
Ursprung
cfb274d3af
Commit
9fd1b06aa8
@ -56,14 +56,14 @@ index 3c48d9463..7b02b253c 100644
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
index b3b303b3b..fc8be86fd 100644
|
||||
index b3b303b3b..fc6c3bf71 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
@@ -0,0 +0,0 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
|
||||
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
||||
this.a = entityinsentient;
|
||||
+ if (entityinsentient.fromMobSpawner && entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper
|
||||
+ if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper
|
||||
this.a(4);
|
||||
if (entityinsentient.getNavigation() instanceof Navigation) {
|
||||
((Navigation) entityinsentient.getNavigation()).c(true);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren