PaperSpigot-Parent/Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch
Zach Brown f243a4024d Remove several broken or unnecessary patches.
Removes PlayerMicroMoveEvent API, the ability to disable the AsyncCatcher, and the TeleportPassengerVehicleWithPlayer patch
2015-09-12 19:57:39 -05:00

47 lines
1.8 KiB
Diff

From 3a9f1ad42ef76caca5fcfc663e91f27d9c963833 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 7 Mar 2015 21:03:06 -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 a8a327d..aa38fe6 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -33,6 +33,7 @@ public abstract class EntityInsentient extends EntityLiving {
private boolean bo;
private Entity bp;
private NBTTagCompound bq;
+ public PathfinderGoalFloat goalFloat; // PaperSpigot
public EntityInsentient(World world) {
super(world);
@@ -460,6 +461,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
+ // PaperSpigot start - Allow nerfed mobs to jump
+ if (goalFloat != null) {
+ if (goalFloat.a()) goalFloat.e();
+ this.g.b();
+ }
+ // PaperSpigot 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 6014b09..da019c1 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; // PaperSpigot
this.a(4);
((Navigation) entityinsentient.getNavigation()).d(true);
}
--
2.5.1