Skip to content

Commit

Permalink
small clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
JR1811 committed Sep 15, 2024
1 parent 118732a commit f00f3c4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import net.minecraft.util.Identifier;

import java.nio.file.Path;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;

public class TranslationProvider extends FabricLanguageProvider {
Expand Down Expand Up @@ -48,7 +48,7 @@ public void generateTranslations(RegistryWrapper.WrapperLookup registryLookup, T
* @return clean and human-readable translated String
*/
public static String cleanString(Identifier identifier) {
String[] words = Arrays.stream(identifier.getPath().split("/")).toList().getLast().split("_");
String[] words = List.of(identifier.getPath().split("/")).getLast().split("_");
StringBuilder output = new StringBuilder();
for (int i = 0; i < words.length; i++) {
String word = words[i];
Expand Down

0 comments on commit f00f3c4

Please sign in to comment.