Skip to content

Commit

Permalink
Fix render distance being capped at 20 (#428)
Browse files Browse the repository at this point in the history
* Fix render distance being capped at 20 in singleplayer

* Clean up imports

---------

Co-authored-by: George Paton <[email protected]>
  • Loading branch information
MellowArpeggiation and George Paton authored Apr 19, 2024
1 parent efe7c16 commit eb8a826
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public enum Mixins {
,"sodium.MixinLongHashMap"
,"sodium.MixinRender"
,"sodium.MixinRenderingRegistry"
,"sodium.MixinPlayerManager"
)
),

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.gtnewhorizons.angelica.mixins.early.sodium;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArgs;
import org.spongepowered.asm.mixin.injection.invoke.arg.Args;

import net.minecraft.server.management.PlayerManager;

@Mixin(PlayerManager.class)
public class MixinPlayerManager {

@ModifyArgs(method = "func_152622_a(I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/MathHelper;clamp_int(III)I"))
public void clamp_int(Args args) {
args.set(2, 32);
}

}

0 comments on commit eb8a826

Please sign in to comment.