generated from NeoForgeMDKs/MDK-1.21-ModDevGradle
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bunch of things. JEI now has "Energy Required" text for recipes (ener…
…gy per tick * time), and a bunch of other things
- Loading branch information
1 parent
573621e
commit e4861e9
Showing
5 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/main/java/dev/wolfieboy09/qstorage/api/util/FormattingUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.wolfieboy09.qstorage.api.util; | ||
|
||
public class FormattingUtil { | ||
public static String formatNumber(int number) { | ||
if (number >= 1_000_000_000) { | ||
return String.format("%.1fB", number / 1_000_000_000.0); | ||
} else if (number >= 1_000_000) { | ||
return String.format("%.1fM", number / 1_000_000.0); | ||
} else if (number >= 1_000) { | ||
return String.format("%.1fk", number / 1_000.0); | ||
} else { | ||
return String.valueOf(number); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters