Skip to content

Commit 3f3d850

Browse files
committed
4.0.5
1 parent 379317c commit 3f3d850

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ minecraft_version = 1.19
66
yarn_mappings = 1.19+build.4
77
loader_version = 0.14.19
88

9-
mod_version = 4.0.4
9+
mod_version = 4.0.5
1010
maven_group = net.krlite
1111
archives_base_name = splasher
1212

src/main/java/net/krlite/splasher/supplier/SplashTextSupplier.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import net.minecraft.client.util.Session;
99
import net.minecraft.text.Text;
1010
import org.apache.commons.compress.utils.Lists;
11+
import org.jetbrains.annotations.Nullable;
1112

1213
import java.nio.file.Path;
1314
import java.util.*;
@@ -17,7 +18,7 @@
1718
public class SplashTextSupplier {
1819
private static int lastRandomIndex = -1;
1920

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

2324
if (CONFIG.colorful) {
@@ -74,6 +75,7 @@ public static String getSplashes(Session session, List<String> splashTexts) {
7475

7576
private static int nextRandomIndex(int size) {
7677
if (size < 0) return -1;
78+
if (size == 1) return 0;
7779
int index = new Random().nextInt(size);
7880

7981
if (index == lastRandomIndex) return nextRandomIndex(size);

0 commit comments

Comments
 (0)