Skip to content

Commit

Permalink
4.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Jul 27, 2023
1 parent 6463b75 commit d27cf16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version = 1.19.4
yarn_mappings = 1.19.4+build.2
loader_version = 0.14.19

mod_version = 4.0.4
mod_version = 4.0.5
maven_group = net.krlite
archives_base_name = splasher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import net.minecraft.client.util.Session;
import net.minecraft.text.Text;
import org.apache.commons.compress.utils.Lists;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.nio.file.Path;
import java.util.*;
Expand All @@ -17,7 +19,7 @@
public class SplashTextSupplier {
private static int lastRandomIndex = -1;

public static String getSplashes(Session session, List<String> splashTexts) {
@Nullable public static String getSplashes(Session session, List<String> splashTexts) {
Path path = FabricLoader.getInstance().getConfigDir().resolve(Splasher.ID);

if (CONFIG.colorful) {
Expand Down Expand Up @@ -74,6 +76,7 @@ public static String getSplashes(Session session, List<String> splashTexts) {

private static int nextRandomIndex(int size) {
if (size < 0) return -1;
if (size == 1) return 0;
int index = new Random().nextInt(size);

if (index == lastRandomIndex) return nextRandomIndex(size);
Expand Down

0 comments on commit d27cf16

Please sign in to comment.