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

39 lines
2 KiB
Diff

From 8caf8aefb286bf37fa35d968607d09dc5d5691dc Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 24 Oct 2015 01:16:22 -0500
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 08041af..13ab789 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1419,10 +1419,10 @@ public abstract class World implements IBlockAccess {
guardEntityList = true; // Spigot
// CraftBukkit start - Use field for loop variable
int entitiesThisCycle = 0;
- if (tickPosition < 0) tickPosition = 0;
- for (entityLimiter.initTick();
- entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue());
- tickPosition++, entitiesThisCycle++) {
+ // PaperSpigot start - Disable tick limiters
+ //if (tickPosition < 0) tickPosition = 0;
+ for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) {
+ // PaperSpigot end
tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
entity = (Entity) this.entityList.get(this.tickPosition);
// CraftBukkit end
@@ -1485,9 +1485,7 @@ public abstract class World implements IBlockAccess {
// Spigot start
int tilesThisCycle = 0;
- for (tileLimiter.initTick();
- tilesThisCycle < tileEntityList.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue());
- tileTickPosition++, tilesThisCycle++) {
+ for (tileTickPosition = 0; tileTickPosition < tileEntityList.size(); tileTickPosition++) { // PaperSpigot - Disable tick limiters
tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0;
TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);
// Spigot start
--
2.6.2