From af73f87c667e093b1fb3e3819851d22aca08d609 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 18 Mar 2016 17:11:53 -0400
Subject: [PATCH] Remove checkIfActive timings

Unneeded and adds extra timings cost to every entity tick
---
 Spigot-Server-Patches/Timings-v2.patch | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/Spigot-Server-Patches/Timings-v2.patch b/Spigot-Server-Patches/Timings-v2.patch
index 9a45d46c93..3f975e3db4 100644
--- a/Spigot-Server-Patches/Timings-v2.patch
+++ b/Spigot-Server-Patches/Timings-v2.patch
@@ -38,7 +38,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    public static final Timing playerCommandTimer = Timings.ofSafe("playerCommand");
 +
 +    public static final Timing entityActivationCheckTimer = Timings.ofSafe("entityActivationCheck");
-+    public static final Timing checkIfActiveTimer = Timings.ofSafe("checkIfActive");
 +
 +    public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update");
 +    public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate");
@@ -1119,4 +1118,24 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
  public class ActivationRange
  {
+@@ -0,0 +0,0 @@ public class ActivationRange
+      */
+     public static boolean checkIfActive(Entity entity)
+     {
+-        SpigotTimings.checkIfActiveTimer.startTiming();
+         // Never safe to skip fireworks or entities not yet added to chunk
+         // PAIL: inChunk
+         if ( !entity.isAddedToChunk() || entity instanceof EntityFireworks ) { // Paper - EAR: Fix bug with teleporting entities
+-            SpigotTimings.checkIfActiveTimer.stopTiming();
+             return true;
+         }
+ 
+@@ -0,0 +0,0 @@ public class ActivationRange
+         {
+             isActive = false;
+         }
+-        SpigotTimings.checkIfActiveTimer.stopTiming();
+         return isActive;
+     }
+ }
 --
\ No newline at end of file