How can I make a flower spawn in a biome from another mod?

Started by S33R_OF_PYR3 on

Topic category: Help with MCreator software

Last seen on 05:01, 29. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make a flower spawn in a biome from another mod?

This is a mod for Forge version 1.19.2.

 

So I tried making a custom biome but the way its generated and the fact that the custom trees won't spawn in it for some reason has lead me to scrap that idea. Instead, I just want to make the flowers spawn in biomes from other mods, BoP and BYG.

 

I have a procedure set up with the flowers to define the condition under which they can generate, as shown in the edited code below. I then set the flowers to have no biome restriction so it would only apply the condition.

public class CatmintAdditionalPlacinggrowthConditionProcedure {

public static boolean execute(LevelAccessor world, double x, double y, double z) {
if (world.getBiome(new BlockPos(x, y, z)).is(new ResourceLocation("byg:zelkova_forest"))) {
return true;
}
return false;
}
}

I then added the mods as dependencies in Workspace Settings, biomesoplenty and byg respectively. I know those names are correct as I accidentally wrote biomes_o_plenty instead and the game gave a crash error because it wasn't installed, I changed it and it ran.

 

The problem now is that when I try to create a new world, the datapacks fail to verify and in fact a datapack with the assets for my mod is disabled, trying to enable it in the Datapacks tab says it fails to verify. When exploring the biomes, the flowers aren't spawning. I've checked that the ground isn't made of something the flowers can't spawn on, so I assume it's just an issue of further integration needed than just changing the code of the procedure. If anyone has done something similar to this in integrating elements from other mods, please offer advice!

Last seen on 05:01, 29. Jan 2024
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh yea I also need to do…
Mon, 11/21/2022 - 06:22

oh yea I also need to do this for ores spawning in modded biomes, which I will try to implement using the same method of change biome name in the spot where its listed in code, so help on this would b appreciated x-x