-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Is your feature request related to a problem?
I'm trying to get rid of NMS code from a plugin since Paper API now support custom biomes & custom biome tags.
I haven't found a way to know if there is snow or rain in a biome with the API. I know we can know if the world hasStorm, but I would like to know if a specific biome is wet enough to be rainy.
This is what I'm currently using
private static double getWeatherTemperatureModifier(Location location) {
if (!NMSBiomeUtils.getBiome(location).hasPrecipitation()) { // access NMS biome
return 0.0;
} else if (location.getWorld().isThundering()) {
return 0.1;
} else if (location.getWorld().hasStorm()) {
return 0.2;
} else {
return 0.0;
}
}Describe the solution you'd like.
I would love to have a org.bukkit.block.Biome.hasPrecipitation() function that works as the vanilla one:
- return true if the biome .json file contains
"has_precipitation": true. - else return false.
An access to Biome.Precipitation getPrecipitationAt(BlockPos pos, int seaLevel) would probably usefull to some people to.
Describe alternatives you've considered.
I've tried to get the precipitation from somewhere else in the Paper API, but it doesn't look like to have a hasPrecipitation() function anywhere.
Other
Thanks for all the new API stuff about biomes.