Inconstistent Biome Temperature Level Values
Kongga666 opened this issue ยท 2 comments
What's the issue you encountered?
Issue
In getBiomeTemperatureLevel we have those values:
if (biome.is(ModTags.Biomes.ICY_BIOMES)) return TemperatureLevel.ICY;
else if (biome.is(ModTags.Biomes.COLD_BIOMES)) return TemperatureLevel.COLD;
else if (biome.is(ModTags.Biomes.NEUTRAL_BIOMES)) return TemperatureLevel.NEUTRAL;
else if (biome.is(ModTags.Biomes.WARM_BIOMES)) return TemperatureLevel.WARM;
else if (biome.is(ModTags.Biomes.HOT_BIOMES)) return TemperatureLevel.HOT;
else if (biomeTemperature < 0.15F) return TemperatureLevel.ICY;
else if (biomeTemperature >= 0.15F && biomeTemperature < 0.45F) return TemperatureLevel.COLD;
else if (biomeTemperature >= 0.45F && biomeTemperature < 0.85F) return TemperatureLevel.NEUTRAL;
else if (biomeTemperature >= 0.85F && biomeTemperature < 1.0F) return TemperatureLevel.WARM;
else if (biomeTemperature >= 1.0F) return TemperatureLevel.HOT;
Or in the minecraft wiki the minecraft default biomes values applied to this code would return a different result than the one in tags files.
Exemple
Stony Peaks has a base Temperature level at 1.0, so the code would flag it as HOT Biome (if it was a modded biome) but in the neutral_biome.json we can see it is flagged as NEUTRAL Biome.
Conclusion
The issue wont appear with minecraft defaults Biomes, but if other mods base their Temperature Levels on the defaults one of Minecraft (For exemple: Biome'O'Plenty), it will have unlogical behavior.
Proposition
I think the values should be something along:
if (biome.is(ModTags.Biomes.ICY_BIOMES)) return TemperatureLevel.ICY;
else if (biome.is(ModTags.Biomes.COLD_BIOMES)) return TemperatureLevel.COLD;
else if (biome.is(ModTags.Biomes.NEUTRAL_BIOMES)) return TemperatureLevel.NEUTRAL;
else if (biome.is(ModTags.Biomes.WARM_BIOMES)) return TemperatureLevel.WARM;
else if (biome.is(ModTags.Biomes.HOT_BIOMES)) return TemperatureLevel.HOT;
else if (biomeTemperature <= 0F) return TemperatureLevel.ICY;
else if (biomeTemperature > 0F && biomeTemperature <= 0.25F) return TemperatureLevel.COLD;
else if (biomeTemperature > 0.25F && biomeTemperature < 1.0F) return TemperatureLevel.NEUTRAL;
else if (biomeTemperature >= 1.0F && biomeTemperature < 2.0F) return TemperatureLevel.WARM;
else if (biomeTemperature >= 2.0F) return TemperatureLevel.HOT;
How can the issue be reproduced?
Install Biome'O'Plenty
In Game:
/locate biome scrubland
/tp @a [coordinates]
See that the thermometer goes to HOT, but i guess the biome should be WARM.
Logs
No response
Mod Version
1.2x.x
Additional information
I consider it a bug, because if there were no tags files, the Default Biomes would have been wrongly Temperature Level Flagged.
Ok i guess i played on a version of Biome'O'Plenty that didn't had the tags (1.20.1) !
This is the whole reason the tag overrides exist, because biome temperatures aren't always going to be set in a way that makes sense, either by vanilla OR biome mods. The automated temperatures were designed around vanilla biome temperatures years ago, but newer biomes may not have temperatures that make sense. Like, the Stony Peaks really shouldn't be 1.0 given it's a mountain biome, but that's what they set it to, and the only thing we can do about that is have the overrides set it to something more normal.
Also Biomes O' Plenty has override tags as well, and the temperatures are perfectly fine for how I want them to be.