mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 13:46:46 +01:00
Slightly reducing the processing required to unload chunks.
This commit is contained in:
parent
57d1cd5f63
commit
9a6ebb0b9a
@ -15,6 +15,7 @@ import java.util.List;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Chunk;
|
||||||
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;
|
||||||
@ -289,10 +290,12 @@ public class HashChunkManager implements ChunkManager {
|
|||||||
if (entity == null || world == null)
|
if (entity == null || world == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (entity.getLocation().getChunk().getX() != cx)
|
Chunk chunk = entity.getLocation().getChunk();
|
||||||
|
|
||||||
|
if (chunk.getX() != cx)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (entity.getLocation().getChunk().getZ() != cz)
|
if (chunk.getZ() != cz)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (entity.getWorld() != world)
|
if (entity.getWorld() != world)
|
||||||
|
Loading…
Reference in New Issue
Block a user