mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Remove checkIfActive timings
Unneeded and adds extra timings cost to every entity tick
This commit is contained in:
parent
3ce3b26186
commit
af73f87c66
1 changed files with 20 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
--
|
Loading…
Reference in a new issue