This commit is contained in:
loki5512344 2026-07-30 11:12:56 +02:00
commit 8084ac50b3
1629 changed files with 238620 additions and 0 deletions

View file

@ -0,0 +1,43 @@
/*
* This file is part of the Combatant Client distribution.
* Copyright (c) 2026 pivosos2007.
*
* Licensed under the GNU General Public License v3.0.
*/
package dev.loki.lovisual.mixins;
import net.minecraft.world.level.Level;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import dev.loki.lovisual.features.module.Modules;
import dev.loki.lovisual.features.module.modules.visuals.WorldTweaks;
import dev.loki.lovisual.features.module.modules.visuals.WorldTweaks.WeatherMode;
@Mixin(Level.class)
public abstract class LevelMixin {
@Inject(method = "getRainLevel", at = @At("HEAD"), cancellable = true)
private void picker$rainGradient(float tickDelta, CallbackInfoReturnable<Float> cir) {
WorldTweaks wt = Modules.get(WorldTweaks.class);
if (wt == null || !wt.isWeatherControlEnabled()) return;
WeatherMode mode = wt.getWeatherMode();
cir.setReturnValue(
(mode == WeatherMode.RAIN || mode == WeatherMode.THUNDER) ? 1.0F : 0.0F
);
}
@Inject(method = "getThunderLevel", at = @At("HEAD"), cancellable = true)
private void picker$thunderGradient(float tickDelta, CallbackInfoReturnable<Float> cir) {
WorldTweaks wt = Modules.get(WorldTweaks.class);
if (wt == null || !wt.isWeatherControlEnabled()) return;
cir.setReturnValue(
wt.getWeatherMode() == WeatherMode.THUNDER ? 1.0F : 0.0F
);
}
}