mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 02:48:14 -05:00
Update #48 - Added some features from OptiFine
This commit is contained in:
18
sources/main/java/net/optifine/config/Weather.java
Normal file
18
sources/main/java/net/optifine/config/Weather.java
Normal file
@ -0,0 +1,18 @@
|
||||
package net.optifine.config;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public enum Weather {
|
||||
CLEAR, RAIN, THUNDER;
|
||||
|
||||
public static Weather getWeather(World world, float partialTicks) {
|
||||
float f = world.getThunderStrength(partialTicks);
|
||||
|
||||
if (f > 0.5F) {
|
||||
return THUNDER;
|
||||
} else {
|
||||
float f1 = world.getRainStrength(partialTicks);
|
||||
return f1 > 0.5F ? RAIN : CLEAR;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user