From af5daaeeeb0aaa8476311bf3aeb532710530fd91 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 7 Oct 2015 17:23:59 +1100 Subject: [PATCH] Fix incorrect logic in entity tick limiter to match tile entity tick limiter. Simply a fix to the small performance shortpath. --- .../0152-Allow-Capping-Tile-Entity-Tick-Time.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CraftBukkit-Patches/0152-Allow-Capping-Tile-Entity-Tick-Time.patch b/CraftBukkit-Patches/0152-Allow-Capping-Tile-Entity-Tick-Time.patch index 572d5a7469..a1af16efa6 100644 --- a/CraftBukkit-Patches/0152-Allow-Capping-Tile-Entity-Tick-Time.patch +++ b/CraftBukkit-Patches/0152-Allow-Capping-Tile-Entity-Tick-Time.patch @@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + int entitiesThisCycle = 0; + if (tickPosition < 0) tickPosition = 0; + for (entityLimiter.initTick(); -+ entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 == 0 || entityLimiter.shouldContinue()); ++ entitiesThisCycle < entityList.size() && (entitiesThisCycle % 10 != 0 || entityLimiter.shouldContinue()); + tickPosition++, entitiesThisCycle++) { + tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0; entity = (Entity) this.entityList.get(this.tickPosition); @@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Spigot start + int tilesThisCycle = 0; + for (tileLimiter.initTick(); -+ tilesThisCycle < tileEntityList.size() && (tilesThisCycle % 10 == 0 || tileLimiter.shouldContinue()); ++ tilesThisCycle < tileEntityList.size() && (tilesThisCycle % 10 != 0 || tileLimiter.shouldContinue()); + tileTickPosition++, tilesThisCycle++) { + tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0; + TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);