mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Reducing CPU usage on chunk load.
This commit is contained in:
parent
50de88a0a0
commit
00f24fd5bd
@ -17,6 +17,7 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.FallingBlock;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
|
|
||||||
import com.gmail.nossr50.runnables.blockstoreconversion.BlockStoreConversionZDirectory;
|
import com.gmail.nossr50.runnables.blockstoreconversion.BlockStoreConversionZDirectory;
|
||||||
@ -179,7 +180,12 @@ public class HashChunkManager implements ChunkManager {
|
|||||||
|
|
||||||
iteratingMobs = true;
|
iteratingMobs = true;
|
||||||
|
|
||||||
for (Entity entity : world.getEntities()) {
|
for (LivingEntity entity : world.getLivingEntities()) {
|
||||||
|
if (mobs.contains(entity.getUniqueId()))
|
||||||
|
addSpawnedMob(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
for(FallingBlock entity: world.getEntitiesByClass(FallingBlock.class)) {
|
||||||
if (mobs.contains(entity.getUniqueId()))
|
if (mobs.contains(entity.getUniqueId()))
|
||||||
addSpawnedMob(entity);
|
addSpawnedMob(entity);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user