world generator
#1
Hello!

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?
Reply
Thanks given by:


Messages In This Thread
world generator - by Seadragon91 - 05-04-2014, 10:05 PM
RE: world generator - by xoft - 05-04-2014, 10:31 PM
RE: world generator - by Seadragon91 - 05-04-2014, 11:39 PM
RE: world generator - by xoft - 05-05-2014, 12:34 AM
RE: world generator - by Seadragon91 - 05-05-2014, 05:06 AM
RE: world generator - by bearbin - 05-05-2014, 05:20 AM
RE: world generator - by NiLSPACE - 05-05-2014, 05:33 AM
RE: world generator - by xoft - 05-05-2014, 03:10 PM
RE: world generator - by Seadragon91 - 05-05-2014, 03:29 PM
RE: world generator - by tigerw - 05-05-2014, 08:06 PM
RE: world generator - by Seadragon91 - 05-05-2014, 09:00 PM
RE: world generator - by worktycho - 05-06-2014, 01:00 AM
RE: world generator - by worktycho - 05-06-2014, 01:12 AM
RE: world generator - by Seadragon91 - 05-06-2014, 03:16 AM
RE: world generator - by xoft - 05-06-2014, 04:52 AM
RE: world generator - by Seadragon91 - 05-06-2014, 05:00 AM
RE: world generator - by NiLSPACE - 09-20-2014, 08:02 PM
RE: world generator - by xoft - 09-21-2014, 01:03 AM
RE: world generator - by worktycho - 09-22-2014, 02:27 AM



Users browsing this thread: 1 Guest(s)