Full module source: 1 implementation
Every implementation below is the complete module file, verbatim. Expand a client to read its code.
OfflineClientRENDERsrc/main/java/com/jellypudding/offlineclient/modules/render/Weather.javaJava · 34 lines · 1.1 KB
Sets the rain and thunder you see. Clears them by default.
SettingsRainThunder
| 1 | package com.jellypudding.offlineclient.modules.render;
|
| 2 |
|
| 3 | import com.jellypudding.offlineclient.module.Category;
|
| 4 | import com.jellypudding.offlineclient.module.Module;
|
| 5 | import com.jellypudding.offlineclient.setting.NumberSetting;
|
| 6 |
|
| 7 | // LevelMixin hands these levels back in place of the real ones.
|
| 8 | public final class Weather extends Module {
|
| 9 |
|
| 10 | private final NumberSetting rain = new NumberSetting("Rain",
|
| 11 | "How heavy the rain looks. Zero is a clear sky.", 0, 0, 1, 0.05).max(1);
|
| 12 | private final NumberSetting thunder = new NumberSetting("Thunder",
|
| 13 | "How dark a storm looks. Zero is no storm.", 0, 0, 1, 0.05).max(1);
|
| 14 |
|
| 15 | public Weather() {
|
| 16 | super("Weather", "Sets the rain and thunder you see. Clears them by default.", Category.RENDER);
|
| 17 | addSettings(rain, thunder);
|
| 18 | searchTags("clear skies", "no rain", "weather changer");
|
| 19 | }
|
| 20 |
|
| 21 | @Override
|
| 22 | public String getSuffix() {
|
| 23 | return rain.getValue() == 0 && thunder.getValue() == 0 ? "Clear" : null;
|
| 24 | }
|
| 25 |
|
| 26 | public float rainLevel() {
|
| 27 | return rain.getFloat();
|
| 28 | }
|
| 29 |
|
| 30 | public float thunderLevel() {
|
| 31 | return thunder.getFloat();
|
| 32 | }
|
| 33 | }
|
| 34 |
|