Posts: 26
Threads: 8
Joined: Jun 2013
Thanks: 27
Given 3 thank(s) in 3 post(s)
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?
Posts: 26
Threads: 8
Joined: Jun 2013
Thanks: 27
Given 3 thank(s) in 3 post(s)
But still, what MinX, MaxX, MinZ, MaxZ should I use so that it covers all the known world?
Posts: 26
Threads: 8
Joined: Jun 2013
Thanks: 27
Given 3 thank(s) in 3 post(s)
07-05-2014, 10:26 PM
(This post was last modified: 07-05-2014, 10:32 PM by jimmis98.)
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...
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
Then use the OnChunkGenerated hook and set it for each chunk as it is generated.
Posts: 952
Threads: 16
Joined: May 2013
Thanks: 66
Given 105 thank(s) in 89 post(s)
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?
Posts: 783
Threads: 12
Joined: Jan 2014
Thanks: 2
Given 73 thank(s) in 61 post(s)
07-06-2014, 01:32 AM
(This post was last modified: 07-06-2014, 01:34 AM by worktycho.)
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.
Posts: 1,469
Threads: 57
Joined: Jul 2012
Thanks: 66
Given 127 thank(s) in 108 post(s)
OnchunkGenerating is useless, he wants to change existing chunks, not new ones.