Paper/Spigot-Server-Patches/0012-Allow-nerfed-mobs-to-jump.patch

47 Zeilen
1.8 KiB
Diff

From 16d6d0c97aa09ddcdf5f1073b347306496d94437 Mon Sep 17 00:00:00 2001
2015-01-29 22:25:50 +01:00
From: Zach Brown <zach.brown@destroystokyo.com>
2015-03-08 02:16:09 +01:00
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 f8aec29..e83d94f 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);
}
--
1.9.5.msysgit.1