9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-25 18:09:28 +00:00

small changes

Fix weather detection issue
This commit is contained in:
jhqwqmc
2024-04-07 21:15:09 +08:00
committed by GitHub
parent 1e47a49926
commit 5873af4558

View File

@@ -419,9 +419,8 @@ public class RequirementManagerImpl implements RequirementManager {
return state -> {
String currentWeather;
World world = state.getLocation().getWorld();
if (world.hasStorm()) currentWeather = "rainstorm";
if (world.isClearWeather()) currentWeather = "clear";
else if (world.isThundering()) currentWeather = "thunder";
else if (world.isClearWeather()) currentWeather = "clear";
else currentWeather = "rain";
for (String weather : weathers)
if (weather.equalsIgnoreCase(currentWeather))