Skip to content

Commit 9df6abb

Browse files
committed
Simplify code
1 parent 1cfb0e6 commit 9df6abb

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

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

4040
private static int setMaxFps(FabricClientCommandSource source, int maxFps) {
41-
int maxRefreshRate = MAX_REFRESH_RATE.getAsInt();
42-
boolean unlimited;
43-
if (maxFps > maxRefreshRate) {
44-
maxFps = maxRefreshRate;
45-
unlimited = true;
46-
} else {
47-
unlimited = false;
48-
}
4941
source.getClient().getFramerateLimitTracker().setFramerateLimit(maxFps);
42+
int maxRefreshRate = MAX_REFRESH_RATE.getAsInt();
43+
boolean unlimited = maxFps > maxRefreshRate;
5044
if (unlimited) {
5145
source.sendFeedback(Component.translatable("commands.cfps.setMaxFps.unlimited"));
5246
} else {

0 commit comments

Comments
 (0)