Skip to content

Commit

Permalink
Merge branch '1.19.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Druzai committed Jan 11, 2023
2 parents 8f5ed90 + 93e0ceb commit dcef4df
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/cazsius/deathquotes/utils/Funcs.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ public static boolean loadQuotes(boolean fromJar) {
int quotesNumber;
switch (percent) {
case 0 -> quotesNumber = 0;
case 100 -> quotesNumber = quotes.length - 1;
case 100 -> quotesNumber = quotes.length;
default -> quotesNumber = (int) Math.ceil((double) quotes.length / 100 * percent);
}
if (quotesNumber >= quotes.length){
quotesNumber = quotes.length - 1;
}
quotesSet = new LimitedSet<>(quotesNumber, DeathQuotes.COMMON_CONFIG.getClearListOfNonRepeatableQuotes());
} catch (UncheckedIOException ex) {
continue;
Expand Down

0 comments on commit dcef4df

Please sign in to comment.