From 3c9287252093ee64ba3e8fa58fb05488fd30d43b Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sun, 26 Jan 2020 17:10:34 -0600 Subject: [PATCH] Remove part of Paper's EAR optimizations until they fix hasTasks() method --- ...aper-s-EAR-optimizations-until-they-.patch | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 patches/server/0099-Remove-part-of-Paper-s-EAR-optimizations-until-they-.patch diff --git a/patches/server/0099-Remove-part-of-Paper-s-EAR-optimizations-until-they-.patch b/patches/server/0099-Remove-part-of-Paper-s-EAR-optimizations-until-they-.patch new file mode 100644 index 000000000..9f308ba08 --- /dev/null +++ b/patches/server/0099-Remove-part-of-Paper-s-EAR-optimizations-until-they-.patch @@ -0,0 +1,32 @@ +From 97aeba89498b4b8cdc64a54b37b81aa50bfa2cf8 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Sun, 26 Jan 2020 16:58:03 -0600 +Subject: [PATCH] Remove part of Paper's EAR optimizations until they fix + hasTasks() method + +--- + src/main/java/org/spigotmc/ActivationRange.java | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java +index da5fef091a..2c0f76e8c1 100644 +--- a/src/main/java/org/spigotmc/ActivationRange.java ++++ b/src/main/java/org/spigotmc/ActivationRange.java +@@ -286,12 +286,12 @@ public class ActivationRange + } + isActive = true; + // Paper start +- } else if (entity instanceof EntityInsentient && ((EntityInsentient) entity).targetSelector.hasTasks()) { ++ } else if (false && entity instanceof EntityInsentient && ((EntityInsentient) entity).targetSelector.hasTasks()) { // Purpur - remove targetSelector.hasTasks + isActive = true; + } + // Paper end + // Add a little performance juice to active entities. Skip 1/4 if not immune. +- } else if ( !entity.defaultActivationState && entity.ticksLived % 4 == 0 && !(entity instanceof EntityInsentient && ((EntityInsentient) entity).targetSelector.hasTasks()) && !checkEntityImmunities( entity ) ) // Paper - add targetSelector.hasTasks ++ } else if ( !entity.defaultActivationState && entity.ticksLived % 4 == 0 && !checkEntityImmunities( entity ) ) // Paper - add targetSelector.hasTasks // Purpur - remove targetSelector.hasTasks + { + isActive = false; + } +-- +2.24.0 +