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

40 lines
2.0 KiB
Diff
Raw Normal View History

From 8caf8aefb286bf37fa35d968607d09dc5d5691dc Mon Sep 17 00:00:00 2001
2015-10-17 04:43:03 +02:00
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 24 Oct 2015 01:16:22 -0500
2015-10-17 04:43:03 +02: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 08041af..13ab789 100644
2015-10-17 04:43:03 +02:00
--- 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
2015-10-17 04:43:03 +02:00
int entitiesThisCycle = 0;
- if (tickPosition < 0) tickPosition = 0;
- for (entityLimiter.initTick();
2015-10-17 04:43:03 +02:00
- 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
2015-10-17 04:43:03 +02:00
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 {
2015-10-17 04:43:03 +02:00
// Spigot start
int tilesThisCycle = 0;
- for (tileLimiter.initTick();
2015-10-17 04:43:03 +02:00
- tilesThisCycle < tileEntityList.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue());
- tileTickPosition++, tilesThisCycle++) {
+ for (tileTickPosition = 0; tileTickPosition < tileEntityList.size(); tileTickPosition++) { // PaperSpigot - Disable tick limiters
2015-10-17 04:43:03 +02:00
tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0;
TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);
// Spigot start
2015-10-17 04:43:03 +02:00
--
2.6.2
2015-10-17 04:43:03 +02:00