Paper/Spigot-Server-Patches/0009-Allow-nerfed-mobs-to-jump.patch
2016-03-03 03:46:49 -06:00

47 lines
1.8 KiB
Diff

From f7cca8a66999ab5b254908f7da834e66e0b6bfa3 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 7d4bb9f..a45e87c 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -43,6 +43,7 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bC;
private Entity leashHolder;
private NBTTagCompound bE;
+ public PathfinderGoalFloat goalFloat; // Paper
public EntityInsentient(World world) {
super(world);
@@ -629,6 +630,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
+ // Paper start - Allow nerfed mobs to jump and float
+ if (goalFloat != null) {
+ if (goalFloat.a()) goalFloat.e();
+ this.g.b();
+ }
+ // Paper end
return;
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index 1a20dbf..e385148 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@@ -6,6 +6,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
this.a = entityinsentient;
+ entityinsentient.goalFloat = this; // Paper
this.a(4);
((Navigation) entityinsentient.getNavigation()).c(true);
}
--
2.7.2