File tree 3 files changed +31
-2
lines changed
java/dev/cactooz/sunrotation/mixin
3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ minecraft_version=1.20.4
9
9
loader_version =0.15.11
10
10
11
11
# Mod Properties
12
- mod_version =1.0.0 +1.20.4
12
+ mod_version =1.0.1 +1.20.4
13
13
maven_group =dev.cactooz.sunrotation
14
14
archives_base_name =sunrotation
15
15
Original file line number Diff line number Diff line change
1
+ package dev .cactooz .sunrotation .mixin ;
2
+
3
+ import net .minecraft .client .renderer .FogRenderer ;
4
+ import org .spongepowered .asm .mixin .Mixin ;
5
+ import org .spongepowered .asm .mixin .injection .At ;
6
+ import org .spongepowered .asm .mixin .injection .ModifyArgs ;
7
+ import org .spongepowered .asm .mixin .injection .Slice ;
8
+ import org .spongepowered .asm .mixin .injection .invoke .arg .Args ;
9
+
10
+ @ Mixin (FogRenderer .class )
11
+ public class FogRendererMixin {
12
+ @ ModifyArgs (method = "setupColor" ,
13
+ slice = @ Slice (
14
+ from = @ At (
15
+ value = "INVOKE" ,
16
+ target = "Lnet/minecraft/client/multiplayer/ClientLevel;getSunAngle(F)F" )
17
+ ),
18
+ at = @ At (
19
+ value = "INVOKE" ,
20
+ target = "Lorg/joml/Vector3f;<init>(FFF)V" ,
21
+ ordinal = 0 ))
22
+ private static void reset (Args args ) {
23
+ float x = args .get (0 );
24
+ args .set (0 , 0.0f );
25
+ args .set (1 , 0.0f );
26
+ args .set (2 , -x );
27
+ }
28
+ }
Original file line number Diff line number Diff line change 3
3
"package" : " dev.cactooz.sunrotation.mixin" ,
4
4
"compatibilityLevel" : " JAVA_17" ,
5
5
"mixins" : [
6
- " LevelRendererMixin"
6
+ " LevelRendererMixin" ,
7
+ " FogRendererMixin"
7
8
],
8
9
"injectors" : {
9
10
"defaultRequire" : 1
You can’t perform that action at this time.
0 commit comments