Change Biome Type - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: Change Biome Type (/thread-1524.html) Pages:
1
2
|
Change Biome Type - jimmis98 - 07-05-2014 I am making a seasons plugin. In order for it to work, it needs to change the biome types of all the world it is enabled. I found that what I have to use are one of: SetAreaBiome(MinX, MaxX, MinZ, MaxZ, EMCSBiome) SetAreaBiome(Cuboid, EMCSBiome) SetBiomeAt(BlockX, BlockZ, EMCSBiome) The problem is that I have no idea what parameters should I give it so that it changes the whole generated world... Could you assist me? RE: Change Biome Type - NiLSPACE - 07-05-2014 EMCSBiome are the global constants for biomes. For example biBeach is a beach, biDesert is a desert etc. Example: SetAreaBiome(MinX, MaxX, MinZ, MaxZ, biBeach)Full List: http://mc-server.xoft.cz/LuaAPI/Globals.html#BiomeTypes An explenation for Cuboid is here: http://mc-server.xoft.cz/LuaAPI/cCuboid.html RE: Change Biome Type - jimmis98 - 07-05-2014 But still, what MinX, MaxX, MinZ, MaxZ should I use so that it covers all the known world? RE: Change Biome Type - NiLSPACE - 07-05-2014 Those are numbers. For example: World:SetAreaBiome(0, 5, 0, 5, biOcean)Now in the world between the coordinates X0, 5 and Z0, 5 the biomes will change to an ocean biome. They are simply coordinates. RE: Change Biome Type - jimmis98 - 07-05-2014 But I don't want to change only the world between (eg) the coordinates X0, 5 and Z0, 5. I want to change ALL the known world And I am sorry for vexing you... RE: Change Biome Type - worktycho - 07-05-2014 Then use the OnChunkGenerated hook and set it for each chunk as it is generated. RE: Change Biome Type - bearbin - 07-06-2014 That doesn't work, you need to set it afterwards. Is there an onchunkloaded hook you could use? That would be easiest. And it would avoid extra strain - only change the biomes when somebody is there to see the change. HookChunkAvailable looks perfect: http://mc-server.xoft.cz/LuaAPI/OnChunkAvailable.html RE: Change Biome Type - tigerw - 07-06-2014 You probably want to change chunks that are loaded already as well, and a cWorld::ForEachChunkLoaded will probably be needed. I don't think a similar function is exported though? RE: Change Biome Type - worktycho - 07-06-2014 Actually doble checking the best hook is onChunkGenerating. Then you can inject your biome into the generator pipeline, replacing the default biome generator. Also rereading the post, changing the biome on its own is not enough, as it will only change things like mob spawning. You will also need to trigger chunk regeneration as well. This could be an expensive plugin with the current API. RE: Change Biome Type - bearbin - 07-06-2014 OnchunkGenerating is useless, he wants to change existing chunks, not new ones. |