2016-12-17 12:13:45 +08:00
|
|
|
From 6234b90aa3d52cd7c4fb7d32e32a6513bb871040 Mon Sep 17 00:00:00 2001
|
2015-01-30 05:25:50 +08:00
|
|
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
2016-03-01 07:09:49 +08:00
|
|
|
Date: Tue, 1 Mar 2016 13:24:16 -0600
|
2014-06-30 02:34:16 +08:00
|
|
|
Subject: [PATCH] Allow nerfed mobs to jump
|
|
|
|
|
|
|
|
|
2016-03-19 10:10:20 +08:00
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-11-17 10:23:38 +08:00
|
|
|
index 7b2b95d..021c01b 100644
|
2016-03-19 10:10:20 +08:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-05-17 10:07:12 +08:00
|
|
|
@@ -100,4 +100,9 @@ public class PaperWorldConfig {
|
2016-11-17 10:23:38 +08:00
|
|
|
fishingMaxTicks = getInt("fishing-time-range.MaximumTicks", 600);
|
2016-03-19 10:10:20 +08:00
|
|
|
log("Fishing time ranges are between " + fishingMinTicks +" and " + fishingMaxTicks + " ticks");
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean nerfedMobsShouldJump;
|
|
|
|
+ private void nerfedMobsShouldJump() {
|
|
|
|
+ nerfedMobsShouldJump = getBoolean("spawner-nerfed-mobs-should-jump", false);
|
|
|
|
+ }
|
|
|
|
}
|
2014-06-30 02:34:16 +08:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
2016-11-17 10:23:38 +08:00
|
|
|
index 0dabbaa..50b29c0 100644
|
2014-06-30 02:34:16 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
2016-11-17 10:23:38 +08:00
|
|
|
@@ -44,6 +44,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
|
|
private boolean bD;
|
2016-03-01 07:09:49 +08:00
|
|
|
private Entity leashHolder;
|
2016-11-17 10:23:38 +08:00
|
|
|
private NBTTagCompound bF;
|
|
|
|
+ private NBTTagCompound bG;
|
2016-03-01 07:09:49 +08:00
|
|
|
+ public PathfinderGoalFloat goalFloat; // Paper
|
2015-07-15 01:51:38 +08:00
|
|
|
|
|
|
|
public EntityInsentient(World world) {
|
|
|
|
super(world);
|
2016-11-17 10:23:38 +08:00
|
|
|
@@ -643,6 +645,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
2014-06-30 02:34:16 +08:00
|
|
|
// Spigot Start
|
|
|
|
if ( this.fromMobSpawner )
|
|
|
|
{
|
2016-03-01 07:09:49 +08:00
|
|
|
+ // Paper start - Allow nerfed mobs to jump and float
|
2015-07-15 01:51:38 +08:00
|
|
|
+ if (goalFloat != null) {
|
|
|
|
+ if (goalFloat.a()) goalFloat.e();
|
|
|
|
+ this.g.b();
|
|
|
|
+ }
|
2016-03-01 07:09:49 +08:00
|
|
|
+ // Paper end
|
2014-06-30 02:34:16 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
// Spigot End
|
2015-07-15 01:51:38 +08:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
2016-06-09 11:57:14 +08:00
|
|
|
index e3b4058..c16ad2c 100644
|
2015-07-15 01:51:38 +08:00
|
|
|
--- 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;
|
2016-03-19 10:10:20 +08:00
|
|
|
+ if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper
|
2015-07-15 01:51:38 +08:00
|
|
|
this.a(4);
|
2016-03-01 07:09:49 +08:00
|
|
|
((Navigation) entityinsentient.getNavigation()).c(true);
|
2015-07-15 01:51:38 +08:00
|
|
|
}
|
2014-06-30 02:34:16 +08:00
|
|
|
--
|
2016-12-17 12:13:45 +08:00
|
|
|
2.9.3
|
2014-06-30 02:34:16 +08:00
|
|
|
|