summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/onchunkgenerating.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/Core/onchunkgenerating.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/MCServer/Plugins/Core/onchunkgenerating.lua b/MCServer/Plugins/Core/onchunkgenerating.lua
index 4c97329bd..44a6cf298 100644
--- a/MCServer/Plugins/Core/onchunkgenerating.lua
+++ b/MCServer/Plugins/Core/onchunkgenerating.lua
@@ -1,17 +1,12 @@
function OnChunkGenerating(World, ChunkX, ChunkZ, ChunkDesc)
- if LimitWorld == true then
- SpawnX = math.floor(World:GetSpawnX() / 16)
- SpawnZ = math.floor(World:GetSpawnZ() / 16)
- if ( (SpawnX + LimitWorldWidth) < ChunkX ) or ( (SpawnX - LimitWorldWidth) > ChunkX ) then
- FillBlocks(World, ChunkX, ChunkZ, ChunkDesc)
- end
- if ( (SpawnZ + LimitWorldWidth) < ChunkZ ) or ( (SpawnZ - LimitWorldWidth) > ChunkZ ) then
- FillBlocks(World, ChunkX, ChunkZ, ChunkDesc)
+ if (LimitWorld == true) then
+ if not LimitWorldsCuboid[World:GetName()]:IsInside( Vector3i(ChunkX, 128, ChunkZ) ) then
+ FillBlocks(ChunkDesc)
end
end
end
-function FillBlocks(World, ChunkX, ChunkZ, ChunkDesc)
+function FillBlocks(ChunkDesc)
ChunkDesc:FillBlocks(0,0)
ChunkDesc:SetUseDefaultBiomes(false)
ChunkDesc:SetUseDefaultHeight(false)