EmptyWorldGenerator - no land
#1
Hi,
I was interested in seeing if anyone found a useful way to not generate word data in Cuberite. On native spigot an EmptyWorldGenerator which wouldnt generate additional world data on maps. Does such a thing already exist for cuberite? I didn't see a valid generator as empty listed under https://github.com/cuberite/cuberite/wik...-World.ini.

https://dev.bukkit.org/bukkit-plugins/em...generator/
Reply
Thanks given by:
#2
Here a small plugin that creates a empty world

Code:
function Initialize(Plugin)
    Plugin:SetName("EmptyWorld")
    Plugin:SetVersion(1)

    PLUGIN = Plugin
    cPluginManager:AddHook(cPluginManager.HOOK_CHUNK_GENERATING, OnChunkGenerating)
        
    return true
end
    
function OnChunkGenerating(a_World, a_ChunkX, a_ChunkZ, a_ChunkDesc)
    if (a_World:GetName() == "emptyworld") then
        a_ChunkDesc:SetUseDefaultBiomes(false)
        a_ChunkDesc:SetUseDefaultHeight(false)
        a_ChunkDesc:SetUseDefaultComposition(false)
        a_ChunkDesc:SetUseDefaultFinish(false)
    end
end


1) Create a directory named EmptyWorld inside of the directory Plugins and a file named EmptyWorld.lua and add the code
2) Open the file settings.ini (Server has to be started once, to generate the file)
3) Add under [Plugins] the line Plugin=EmptyWorld
4) Add under [Worlds] the line World=emptyworld

If you join the server you can then use the portal command to join the world: /portal emptyworld. If you get a permission warning run command "/rank <username> Admin" from console.
Reply
Thanks given by:
#3
(09-09-2016, 02:32 PM)Seadragon91 Wrote: Here a small plugin that creates a empty world
Thank you for the fast response. I had taken a look at the Generator and Skywars plugin threads. It was mentioned there that it might be better to use a generator instead of manipulating a plugin to override the generator functions. The other concern mentioned was that the world was generated then replaced once the plugin loaded. Is there a grid generator which an empty world might be better to be implemented in? Would a previously sky island world loaded into cuberite have chunks generated then removed as indicated or would the overide kick in before map loading?

** Edit: ran a test and this does appear to be working as it should. I can't say if chunks are getting replaced but i don't notice any issues so far. thanks!
Reply
Thanks given by:
#4
If you want talk about SkyWars plugin - post into SkyWars thread, please.
Reply
Thanks given by:
#5
(09-09-2016, 07:02 PM)DrMasik Wrote: If you want talk about SkyWars plugin - post into SkyWars thread, please.

No discussion needed, I was using it as an example.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)