summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/Core/onchunkgenerating.lua
diff options
context:
space:
mode:
authornielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-30 21:14:22 +0200
committernielsbreu@gmail.com <nielsbreu@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-06-30 21:14:22 +0200
commit290ab0b588a13cedceac6cdaa33e7e67969b20b2 (patch)
treebba78972be6e7218122d4cec4ccf05b9817c3bc7 /MCServer/Plugins/Core/onchunkgenerating.lua
parentFixed crouch-placing unplaceable items (FS #399) (diff)
downloadcuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar
cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.gz
cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.bz2
cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.lz
cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.xz
cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.tar.zst
cuberite-290ab0b588a13cedceac6cdaa33e7e67969b20b2.zip
Diffstat (limited to 'MCServer/Plugins/Core/onchunkgenerating.lua')
-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)