Paper/CraftBukkit-Patches/0158-Disable-Explosion-avoiding-for-all-mobs.patch
Thinkofdeath 461353e2cb SPIGOT-522: Remove the global api cache option
This was useful when plugins first started upgrading to uuid because each
plugin would implement their own way for grabbing uuid's from mojang. Because
none of them shared the result they would quickly hit the limits on the api
causing the conversion to either fail or pause for long periods of time. The
global api cache was a (very hacky) way to force all plugins to share a cache
but caused a few issues with plugins that expected a full implementation of
the HTTPURLConnection. Due to the fact that most servers/plugins have updated
now it seems to be a good time to remove this as its usefulness mostly has
expired.
2015-02-06 09:03:19 -06:00

36 Zeilen
1.6 KiB
Diff

From 2da2b3d8eadb057e19c25d9ae9f306b4139fb085 Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thinkofdeath@spigotmc.org>
Date: Sat, 27 Dec 2014 21:08:51 +0000
Subject: [PATCH] Disable Explosion avoiding for all mobs
Its going in 1.8.1 anyway
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index d849ee7..1ed769f 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -4,7 +4,7 @@ import org.bukkit.event.entity.EntityCombustByEntityEvent; // CraftBukkit
public abstract class EntityMonster extends EntityCreature implements IMonster {
- protected final PathfinderGoal a = new PathfinderGoalAvoidTarget(this, new EntitySelectorExplodingCreeper(this), 4.0F, 1.0D, 2.0D);
+ protected final PathfinderGoal a = null; // Spigot : new PathfinderGoalAvoidTarget(this, new EntitySelectorExplodingCreeper(this), 4.0F, 1.0D, 2.0D);
public EntityMonster(World world) {
super(world);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
index 35b42db..804ad3a 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
@@ -24,6 +24,7 @@ public class PathfinderGoalSelector {
}
public void a(int i, PathfinderGoal pathfindergoal) {
+ if (pathfindergoal == null) return; // Spigot
this.b.add(new PathfinderGoalSelectorItem(this, i, pathfindergoal));
}
--
2.1.0