Skip to content

Commit 4726de1

Browse files
chore: Update lightning flash hider
[no ci]
1 parent 8992355 commit 4726de1

File tree

4 files changed

+35
-13
lines changed

4 files changed

+35
-13
lines changed

mod/src/main/java/gg/skytils/skytilsmod/mixins/transformers/renderer/MixinEntityRenderer.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
package gg.skytils.skytilsmod.mixins.transformers.renderer;
2020

21-
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
2221
import gg.skytils.skytilsmod.mixins.hooks.renderer.EntityRendererHookKt;
2322
import net.minecraft.client.render.GameRenderer;
2423
import net.minecraft.resource.ResourceReloader;
@@ -33,9 +32,4 @@ public abstract class MixinEntityRenderer implements ResourceReloader {
3332
private void onHurtcam(CallbackInfo ci) {
3433
EntityRendererHookKt.onHurtcam(ci);
3534
}
36-
37-
@ModifyExpressionValue(method = "method_0_3370", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;getTicksSinceLightning()I"))
38-
private int getLastLightningBolt(int orig) {
39-
return EntityRendererHookKt.getLastLightningBolt(orig);
40-
}
4135
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Skytils - Hypixel Skyblock Quality of Life Mod
3+
* Copyright (C) 2020-2025 Skytils
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Affero General Public License as published
7+
* by the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Affero General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Affero General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
package gg.skytils.skytilsmod.mixins.transformers.world;
20+
21+
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
22+
import gg.skytils.skytilsmod.mixins.hooks.world.WorldHookKt;
23+
import net.minecraft.client.world.ClientWorld;
24+
import org.spongepowered.asm.mixin.Mixin;
25+
import org.spongepowered.asm.mixin.injection.At;
26+
27+
@Mixin(ClientWorld.class)
28+
public abstract class MixinClientWorld {
29+
@ModifyExpressionValue(method = "getSkyColor", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/world/ClientWorld;getLightningTicksLeft()I"))
30+
private int skytils$overrideLightningTicks(int original) {
31+
return WorldHookKt.lightningSkyColor(original);
32+
}
33+
}

mod/src/main/java/gg/skytils/skytilsmod/mixins/transformers/world/MixinWorld.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,16 @@
1818

1919
package gg.skytils.skytilsmod.mixins.transformers.world;
2020

21-
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
2221
import gg.skytils.skytilsmod.mixins.hooks.world.WorldHookKt;
23-
import net.minecraft.world.WorldView;
2422
import net.minecraft.world.World;
23+
import net.minecraft.world.WorldView;
2524
import org.spongepowered.asm.mixin.Mixin;
2625
import org.spongepowered.asm.mixin.injection.At;
2726
import org.spongepowered.asm.mixin.injection.Inject;
2827
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
2928

3029
@Mixin(World.class)
3130
public abstract class MixinWorld implements WorldView {
32-
@ModifyExpressionValue(method = "getSkyColorBody", at = @At(value = "FIELD", target = "Lnet/minecraft/world/World;ticksSinceLightning:I"))
33-
private int lightningSkyColor(int orig) {
34-
return WorldHookKt.lightningSkyColor(orig);
35-
}
36-
3731
@Inject(method = "getTimeOfDay", at = @At("HEAD"), cancellable = true)
3832
private void fixTime(CallbackInfoReturnable<Long> cir) {
3933
WorldHookKt.fixTime(this, cir);

mod/src/main/resources/mixins.skytils.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"renderer.MixinWorldRenderer_Glow",
6868
"util.MixinChatStyle",
6969
"util.MixinUtil",
70+
"world.MixinClientWorld",
7071
"world.MixinWorld"
7172
//#if MC==10809
7273
//$$ ,

0 commit comments

Comments
 (0)