mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Nerfed spawner mobs should use PathfinderGoalFloat to swim if available
This commit is contained in:
@@ -2144,6 +2144,35 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return this.id == MobEffectList.WEAKNESS.id ? (double) (-0.5F * (float) (i + 1)) : 1.3D * (double) (i + 1);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
@@ -0,0 +0,0 @@
|
||||
+package net.minecraft.server;
|
||||
+
|
||||
+public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
+
|
||||
+ private EntityInsentient a;
|
||||
+
|
||||
+ public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
||||
+ this.a = entityinsentient;
|
||||
+ this.a(4);
|
||||
+ ((Navigation) entityinsentient.getNavigation()).d(true);
|
||||
+ }
|
||||
+
|
||||
+ public boolean a() {
|
||||
+ return this.a.V() || this.a.ab();
|
||||
+ }
|
||||
+
|
||||
+ public void e() {
|
||||
+ if (this.a.bc().nextFloat() < 0.8F) {
|
||||
+ this.a.getControllerJump().a();
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
Reference in New Issue
Block a user