- feat: Фаза 1 ребрендинг combatant → lovisual + восстановление config - refactor: Фаза 2 — выкинуть Runtime/JarReplacement, заменить на Lifecycle - refactor: Фаза 3.5 — удалить читерские модули, ESP под легит - refactor: Фаза 3 — разбить Renderer2D (3379→2150 фасад + 14 хелперов ≤200) - refactor: Фаза 3 — разбить BetterChatRenderer (2870→210 фасад + 21 хелпер ≤200) - refactor: Фаза 3 — разбить UnifiedSettingRenderer (2798→208 фасад + 24 хелпера ≤200) - refactor: Фаза 3 — разбить ClickGuiRenderer (1887→542 фасад + 15 хелперов ≤200) - refactor: Фаза 3 — разбить NameTags (1791→438 фасад + 11 хелперов ≤200) - refactor: Фаза 3 — разбить TargetHud (1655→340 фасад + 11 хелперов ≤200) - refactor: Фаза 3 — разбить ESP (1538→269 фасад + 11 хелперов ≤200)
43 lines
1.6 KiB
Java
43 lines
1.6 KiB
Java
/*
|
|
* This file is part of the LoVisual 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
|
|
);
|
|
}
|
|
|
|
}
|