papermc/Spigot-Server-Patches/0041-Disable-spigot-tick-limiters.patch

40 lines
2.2 KiB
Diff
Raw Normal View History

From 9195e6d1dda8fbd2f6092064ac7a1381e2d8036c Mon Sep 17 00:00:00 2001
2015-10-17 02:43:03 +00:00
From: Zach Brown <zach.brown@destroystokyo.com>
2016-02-29 23:09:49 +00:00
Date: Wed, 2 Mar 2016 23:45:17 -0600
2015-10-17 02:43:03 +00:00
Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 04493a1f9..d988fd007 100644
2015-10-17 02:43:03 +00:00
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1143,10 +1143,10 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
// CraftBukkit start - Use field for loop variable
2016-03-25 04:59:37 +00:00
co.aikar.timings.TimingHistory.entityTicks += this.entityList.size(); // Paper
2015-10-17 02:43:03 +00:00
int entitiesThisCycle = 0;
- if (tickPosition < 0) tickPosition = 0;
- for (entityLimiter.initTick();
2015-10-17 02:43:03 +00:00
- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue());
- tickPosition++, entitiesThisCycle++) {
2016-02-29 23:09:49 +00:00
+ // Paper start - Disable tick limiters
+ //if (tickPosition < 0) tickPosition = 0;
+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) {
2016-02-29 23:09:49 +00:00
+ // Paper end
2015-10-17 02:43:03 +00:00
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1210,9 +1210,7 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
2015-10-17 02:43:03 +00:00
// Spigot start
2016-02-29 23:09:49 +00:00
// Iterator iterator = this.tileEntityListTick.iterator();
2015-10-17 02:43:03 +00:00
int tilesThisCycle = 0;
- for (tileLimiter.initTick();
2016-02-29 23:09:49 +00:00
- tilesThisCycle < tileEntityListTick.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue());
- tileTickPosition++, tilesThisCycle++) {
2016-02-29 23:09:49 +00:00
+ for (tileTickPosition = 0; tileTickPosition < tileEntityListTick.size(); tileTickPosition++) { // Paper - Disable tick limiters
tileTickPosition = (tileTickPosition < tileEntityListTick.size()) ? tileTickPosition : 0;
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
// Spigot start
2015-10-17 02:43:03 +00:00
--
2.18.0
2015-10-17 02:43:03 +00:00