05-04-2014, 10:05 PM
Hello!
I have looked and played around with the chunk generation. For first I tried to generate a air world with that code.
I tried to use that and get this error in the console
"[14:02:13] cChunk::UnboundedRelGetBlock: requesting a block with a_RelY out of range: -1"
Is a custom world generator supported or not?
I have looked and played around with the chunk generation. For first I tried to generate a air world with that code.
Code:
-- Add hook for chunk generation in function Initialize
cPluginManager:AddHook(cPluginManager.HOOK_CHUNK_GENERATING, AirGenerator)
-- Code for the event
function AirGenerator(World, ChunkX, ChunkZ, ChunkDesc)
if (World:GetName() == "airworld") then
FillBlocks(ChunkDesc)
end
end
function FillBlocks(ChunkDesc)
ChunkDesc:FillBlocks(0, 0) -- air blocks
ChunkDesc:SetUseDefaultBiomes(false)
ChunkDesc:SetUseDefaultHeight(false)
ChunkDesc:SetUseDefaultComposition(false)
-- ChunkDesc:SetUseDefaultStructures(false) deprecated?
ChunkDesc:SetUseDefaultFinish(false)
end
I tried to use that and get this error in the console
"[14:02:13] cChunk::UnboundedRelGetBlock: requesting a block with a_RelY out of range: -1"
Is a custom world generator supported or not?