Skip to content

Commit 8b0ad9d

Browse files
committed
Simplify code
1 parent 1cfb0e6 commit 8b0ad9d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,9 @@ private static int getMaxFps(FabricClientCommandSource source) {
3838
}
3939

4040
private static int setMaxFps(FabricClientCommandSource source, int maxFps) {
41+
source.getClient().getFramerateLimitTracker().setFramerateLimit(maxFps);
4142
int maxRefreshRate = MAX_REFRESH_RATE.getAsInt();
42-
boolean unlimited;
4343
if (maxFps > maxRefreshRate) {
44-
maxFps = maxRefreshRate;
45-
unlimited = true;
46-
} else {
47-
unlimited = false;
48-
}
49-
source.getClient().getFramerateLimitTracker().setFramerateLimit(maxFps);
50-
if (unlimited) {
5144
source.sendFeedback(Component.translatable("commands.cfps.setMaxFps.unlimited"));
5245
} else {
5346
source.sendFeedback(Component.translatable("commands.cfps.setMaxFps.success", maxFps));

0 commit comments

Comments
 (0)