Skip to content

Commit

Permalink
RegistryParser - Stream#toList() not available on older java versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneBeee committed Jul 1, 2024
1 parent 6dba25d commit 1beaf74
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;

/**
* A parser based on a {@link Registry} used to parse data from a string or turn data into a string.
Expand Down Expand Up @@ -145,7 +146,7 @@ private void refresh() {
* Note that some entries may represent the same registry object.
*/
public String getAllNames() {
List<String> strings = parseMap.keySet().stream().filter(s -> !s.startsWith("minecraft:")).sorted().toList();
List<String> strings = parseMap.keySet().stream().filter(s -> !s.startsWith("minecraft:")).sorted().collect(Collectors.toList());
return StringUtils.join(strings, ", ");
}

Expand Down

0 comments on commit 1beaf74

Please sign in to comment.