File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ plugins {
66version = project. mod_version
77group = project. maven_group
88
9+ loom {
10+ accessWidenerPath = file(" src/main/resources/artvk.classtweaker" )
11+ }
12+
913repositories {
1014 // Add repositories to retrieve artifacts from in here.
1115 // You should only use this when depending on other mods because
Original file line number Diff line number Diff line change 1+ package git .artdeell .mixin ;
2+
3+ import net .minecraft .client .Minecraft ;
4+ import net .minecraft .client .OptionInstance ;
5+ import net .minecraft .client .Options ;
6+ import net .minecraft .client .main .GameConfig ;
7+ import org .jetbrains .annotations .NotNull ;
8+ import org .spongepowered .asm .mixin .Final ;
9+ import org .spongepowered .asm .mixin .Mixin ;
10+ import org .spongepowered .asm .mixin .Shadow ;
11+ import org .spongepowered .asm .mixin .injection .At ;
12+ import org .spongepowered .asm .mixin .injection .Inject ;
13+ import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
14+
15+ @ Mixin (Minecraft .class )
16+ public class RenderDistanceMixin {
17+ @ Final @ Shadow public Options options ;
18+ @ Inject (method = "<init>" , at = @ At ("RETURN" ))
19+ private void onMinecraftConstructed (GameConfig gameConfig , CallbackInfo ci ) {
20+ OptionInstance <@ NotNull Integer > renderDistanceOption = options .renderDistance ();
21+ renderDistanceOption .values = new OptionInstance .IntRange (2 , 8 );
22+ if (renderDistanceOption .get () > 8 ) renderDistanceOption .set (8 );
23+ }
24+
25+ }
Original file line number Diff line number Diff line change 1+ classTweaker v1 official
2+ accessible field net/minecraft/client/OptionInstance values Lnet/minecraft/client/OptionInstance$ValueSet;
3+ mutable field net/minecraft/client/OptionInstance values Lnet/minecraft/client/OptionInstance$ValueSet;
Original file line number Diff line number Diff line change 33 "package" : " git.artdeell.mixin" ,
44 "compatibilityLevel" : " JAVA_25" ,
55 "mixins" : [
6- " Vk11BackendMixin"
6+ " Vk11BackendMixin" ,
7+ " RenderDistanceMixin"
78 ],
89 "injectors" : {
910 "defaultRequire" : 1
Original file line number Diff line number Diff line change 1212 },
1313 "license" : " Polyform-Shield-1.0.0" ,
1414 "icon" : " assets/dogshitvk/icon.png" ,
15- "environment" : " *" ,
15+ "accessWidener" : " artvk.classtweaker" ,
16+ "environment" : " client" ,
1617 "entrypoints" : {
1718 "main" : [
1819 " git.artdeell.ArtVK"
You can’t perform that action at this time.
0 commit comments