From 94071f2c3296b58c45db67d6a26a526b0ecbd0bc Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Sun, 27 Jul 2014 21:50:06 -0500 Subject: [PATCH] Remove configurable AI target selector delay patch --- ...onfigurable-AI-target-selector-delay.patch | 58 ------------------- ...on-generator-tendency-to-move-north.patch} | 0 ... 0029-Better-water-lighting-updates.patch} | 0 3 files changed, 58 deletions(-) delete mode 100644 Spigot-Server-Patches/0028-Configurable-AI-target-selector-delay.patch rename Spigot-Server-Patches/{0029-Fix-random-position-generator-tendency-to-move-north.patch => 0028-Fix-random-position-generator-tendency-to-move-north.patch} (100%) rename Spigot-Server-Patches/{0030-Better-water-lighting-updates.patch => 0029-Better-water-lighting-updates.patch} (100%) diff --git a/Spigot-Server-Patches/0028-Configurable-AI-target-selector-delay.patch b/Spigot-Server-Patches/0028-Configurable-AI-target-selector-delay.patch deleted file mode 100644 index d2d619293..000000000 --- a/Spigot-Server-Patches/0028-Configurable-AI-target-selector-delay.patch +++ /dev/null @@ -1,58 +0,0 @@ -From e1c032b6c6917835b571ca24c66fac7b95004d41 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Mon, 14 Jul 2014 01:20:46 -0500 -Subject: [PATCH] Configurable AI target selector delay - - -diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java -index d0f7033..83b0fe2 100644 ---- a/src/main/java/net/minecraft/server/EntityInsentient.java -+++ b/src/main/java/net/minecraft/server/EntityInsentient.java -@@ -395,6 +395,11 @@ public abstract class EntityInsentient extends EntityLiving { - } - } - -+ // PaperSpigot start - Configurable AI delay -+ private int aiTickDelay = org.github.paperspigot.PaperSpigotWorldConfig.aiTickDelay; -+ private int lastRun = -1; -+ // PaperSpigot end -+ - protected void bn() { - ++this.aU; - this.world.methodProfiler.a("checkDespawn"); -@@ -415,9 +420,14 @@ public abstract class EntityInsentient extends EntityLiving { - this.world.methodProfiler.a("sensing"); - this.bq.a(); - this.world.methodProfiler.b(); -- this.world.methodProfiler.a("targetSelector"); -- this.targetSelector.a(); -- this.world.methodProfiler.b(); -+ // PaperSpigot start - Configurable AI delay -+ if (aiTickDelay == 0 || lastRun == -1 || MinecraftServer.currentTick - lastRun >= aiTickDelay) { -+ this.world.methodProfiler.a("targetSelector"); -+ this.targetSelector.a(); -+ this.world.methodProfiler.b(); -+ lastRun = MinecraftServer.currentTick; -+ } -+ // PaperSpigot stop - this.world.methodProfiler.a("goalSelector"); - this.goalSelector.a(); - this.world.methodProfiler.b(); -diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -index 0d388af..765023d 100644 ---- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java -@@ -175,4 +175,10 @@ public class PaperSpigotWorldConfig - { - tntHeightNerf = getDouble( "tnt-entity-height-nerf", 0 ); - } -+ -+ public static int aiTickDelay; -+ private void aiTickDelay() -+ { -+ aiTickDelay = getInt( "ai-tick-delay", 0 ); -+ } - } --- -1.9.1 - diff --git a/Spigot-Server-Patches/0029-Fix-random-position-generator-tendency-to-move-north.patch b/Spigot-Server-Patches/0028-Fix-random-position-generator-tendency-to-move-north.patch similarity index 100% rename from Spigot-Server-Patches/0029-Fix-random-position-generator-tendency-to-move-north.patch rename to Spigot-Server-Patches/0028-Fix-random-position-generator-tendency-to-move-north.patch diff --git a/Spigot-Server-Patches/0030-Better-water-lighting-updates.patch b/Spigot-Server-Patches/0029-Better-water-lighting-updates.patch similarity index 100% rename from Spigot-Server-Patches/0030-Better-water-lighting-updates.patch rename to Spigot-Server-Patches/0029-Better-water-lighting-updates.patch