forked from Johni0702/bobby
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow overwriting of Sodium's max render distance
To do so, add `-Dbobby.sodium-max-distance-overwrite=96` to the JVM arguments.
- Loading branch information
Showing
2 changed files
with
16 additions
and
1 deletion.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
src/main/java/de/johni0702/minecraft/bobby/mixin/sodium/SodiumGameOptionPagesMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package de.johni0702.minecraft.bobby.mixin.sodium; | ||
|
||
import me.jellysquid.mods.sodium.client.gui.SodiumGameOptionPages; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(value = SodiumGameOptionPages.class, remap = false) | ||
public abstract class SodiumGameOptionPagesMixin { | ||
@ModifyConstant(method = "lambda$general$0", constant = @Constant(intValue = 32)) | ||
private static int bobbyMaxRenderDistance(int oldValue) { | ||
return Integer.parseInt(System.getProperty("bobby.sodium-max-distance-overwrite", "" + oldValue)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters