Fixed problems with World.getPlayers()

This commit is contained in:
Johannes Donath 2015-02-27 21:14:00 +01:00
parent 5c0c3d346e
commit b77ae4c941

View file

@ -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++) {