Skip to content

Commit 60eaff1

Browse files
committed
Shift cutoff
1 parent 637bdeb commit 60eaff1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/net/earthcomputer/clientcommands/command/FramerateCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ public static void register(CommandDispatcher<FabricClientCommandSource> dispatc
2323
.suggests((context, builder) -> builder.suggest(MAX_REFRESH_RATE.getAsInt()).buildFuture())
2424
.executes(ctx -> maxFps(ctx.getSource(), getInteger(ctx, "maxfps"))))
2525
.then(literal("unlimited")
26-
.executes(ctx -> maxFps(ctx.getSource(), MAX_REFRESH_RATE.getAsInt()))));
26+
.executes(ctx -> maxFps(ctx.getSource(), MAX_REFRESH_RATE.getAsInt() + 1))));
2727
}
2828

2929
private static int maxFps(FabricClientCommandSource source, int maxFps) {
3030
int maxRefreshRate = MAX_REFRESH_RATE.getAsInt();
3131
boolean unlimited;
32-
if (maxFps >= maxRefreshRate) {
32+
if (maxFps > maxRefreshRate) {
3333
maxFps = maxRefreshRate;
3434
unlimited = true;
3535
} else {

src/main/java/net/earthcomputer/clientcommands/mixin/commands/fps/MinecraftMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
public class MinecraftMixin {
1212
@ModifyConstant(method = "runTick", constant = @Constant(intValue = Options.UNLIMITED_FRAMERATE_CUTOFF))
1313
private int changeCutoff(int original) {
14-
return FramerateCommand.MAX_REFRESH_RATE.getAsInt();
14+
return FramerateCommand.MAX_REFRESH_RATE.getAsInt() + 1;
1515
}
1616
}

0 commit comments

Comments
 (0)