mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-11-21 11:25:42 +01:00
Merge pull request #45 from dkim19375/master
Use PaperLib's isChunkGenerated to prevent loading chunks already generated
This commit is contained in:
commit
cff0b659c2
@ -1,5 +1,6 @@
|
||||
package com.wimbli.WorldBorder;
|
||||
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@ -103,7 +104,10 @@ public class WorldFileData {
|
||||
CoordXZ region = new CoordXZ(CoordXZ.chunkToRegion(x), CoordXZ.chunkToRegion(z));
|
||||
List<Boolean> regionChunks = this.getRegionData(region);
|
||||
// Bukkit.getLogger().info("x: "+x+" z: "+z+" offset: "+coordToRegionOffset(x, z));
|
||||
return regionChunks.get(coordToRegionOffset(x, z));
|
||||
if (regionChunks.get(coordToRegionOffset(x, z))) {
|
||||
return true;
|
||||
}
|
||||
return PaperLib.isChunkGenerated(world, x, z);
|
||||
}
|
||||
|
||||
// Find out if the chunk at the given coordinates has been fully generated.
|
||||
|
Loading…
Reference in New Issue
Block a user