Topic category: Advanced modding
I really want to make some of my mobs spawn in any biome, but only biomes in the Overworld, but I cannot figure out how to do this. If I set them to not be biome restricted, they spawn in every dimension, but having them be biome restricted only allows them to spawn in one biome.
As far as I can tell this string makes a mob spawn in the sepcific biome (in this case, oceans):
After hours of experimentation, I figured out that the code works for any two biomes if the string is like this:
Biome.REGISTRY.getObject(new ResourceLocation("ocean", "forest")));
However, as soon as I add a third biome, to the list, I get this error and it makes no sense at all PLEASE HELP ME! (If there is a simpler way to just have the code say "spawn in all biomes in dimension ID=0"
C:\Pylo\MCreator175\forge\build\sources\main\java\mod\mcreator\mcreator_plast.java:90: error: incompatible types: String cannot be converted to int
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.