mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fix incorrect logic in entity tick limiter to match tile entity tick limiter.
Simply a fix to the small performance shortpath.
This commit is contained in:
parent
2d37e27b37
commit
af5daaeeeb
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue