diff --git a/CraftBukkit-Patches/0160-Allow-Capping-Tile-Entity-Tick-Time.patch b/CraftBukkit-Patches/0160-Allow-Capping-Tile-Entity-Tick-Time.patch index a05b548356..0e1ff8b35f 100644 --- a/CraftBukkit-Patches/0160-Allow-Capping-Tile-Entity-Tick-Time.patch +++ b/CraftBukkit-Patches/0160-Allow-Capping-Tile-Entity-Tick-Time.patch @@ -32,21 +32,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } public World b() { -@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { - this.everyoneSleeping(); - } - -- if (!guardEntityList) { // Spigot - It will get removed after the tick if we are ticking -+ if (false) { // Spigot - It will get removed next tick - int i = entity.ae; - int j = entity.ag; - @@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess { timings.entityTick.startTiming(); // Spigot guardEntityList = true; // Spigot // CraftBukkit start - Use field for loop variable - for (this.tickPosition = 0; this.tickPosition < this.entityList.size(); ++this.tickPosition) { + int entitiesThisCycle = 0; ++ if (tickPosition < 0) tickPosition = 0; + for (entityLimiter.initTick(); + entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 == 0 || entityLimiter.shouldContinue()); + tickPosition++, entitiesThisCycle++) {