Started by
SquidkingInc
on
Topic category: Advanced modding
i made a custom liquid at set it to generate in the overworld but it spawns so frequently that world generation takes ages, how do i make it more rare
Topic category: Advanced modding
i made a custom liquid at set it to generate in the overworld but it spawns so frequently that world generation takes ages, how do i make it more rare
This is not possible yet, but we have a ticket for this open on our issue tracker. Upvote it to get it resolved faster.
Can i do it with custom code though?
You could wrap generator code with a condition such as if(Math.random() > 0.5) to reduce the generating frequency.
Can't find generator code
It is inside generateWorld of your fluid.
How do i wrap it
do i just paste the code in there?
where do i paste it :p
@Override
public void generateSurface(World world, Random random, int chunkX, int chunkZ) {
int i = chunkX + random.nextInt(16) + 8;
int j = random.nextInt(256);
int k = chunkZ + random.nextInt(16) + 8;
new WorldGenLakes(block).generate(world, random, new BlockPos(i, j, k));
}
}
If you don't know where to paste this, you might want to learn some Java before trying this. But you should wrap the generated code with your if statement:
In my example, I use provided random generator so the probability is conditioned with the world seed.