spigot/CraftBukkit-Patches/0033-Fully-Disable-Snooper-When-Not-Required.patch

28 lines
1 KiB
Diff
Raw Normal View History

2018-01-03 10:36:21 +11:00
From f22527d9374b1d8b3bcb9fd8f52779ce8fc2c74c Mon Sep 17 00:00:00 2001
2014-04-12 14:18:37 +10:00
From: agentk20 <agentkid20@gmail.com>
Date: Sat, 3 Aug 2013 19:28:48 +1000
Subject: [PATCH] Fully Disable Snooper When Not Required
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
2017-09-18 20:00:00 +10:00
index 26fe01bae..6aa9b6058 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
2017-08-03 23:00:00 +10:00
@@ -678,11 +678,11 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IAs
2015-02-28 11:36:22 +00:00
this.h[this.ticks % 100] = System.nanoTime() - i;
2014-04-12 14:18:37 +10:00
this.methodProfiler.b();
this.methodProfiler.a("snooper");
2016-03-01 08:33:06 +11:00
- if (!this.m.d() && this.ticks > 100) {
+ if (getSnooperEnabled() && !this.m.d() && this.ticks > 100) { // Spigot
this.m.a();
2014-04-12 14:18:37 +10:00
}
- if (this.ticks % 6000 == 0) {
+ if (getSnooperEnabled() && this.ticks % 6000 == 0) { // Spigot
2016-03-01 08:33:06 +11:00
this.m.b();
2014-04-12 14:18:37 +10:00
}
--
2017-11-17 10:24:35 +11:00
2.14.1
2014-04-12 14:18:37 +10:00