Skip to content

Commit

Permalink
fix: uncapped render distance reset
Browse files Browse the repository at this point in the history
Fixes #262
  • Loading branch information
ishland committed Jan 7, 2024
1 parent bceebe5 commit 5a0e879
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MixinGameOptions {

@Shadow @Final private SimpleOption<Integer> viewDistance;

@Inject(method = "<init>", at = @At("RETURN"))
@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/GameOptions;load()V", shift = At.Shift.BEFORE))
private void onInit(CallbackInfo ci) {
final SimpleOption.ValidatingIntSliderCallbacks callbacks = new SimpleOption.ValidatingIntSliderCallbacks(2, Config.maxViewDistance);
((ISimpleOption<Integer>) this.viewDistance).setCallbacks(callbacks);
Expand Down

0 comments on commit 5a0e879

Please sign in to comment.