Skip to content

Commit a3caac9

Browse files
committed
fix texture binder crash
1 parent a97bd4b commit a3caac9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/cleanroommc/groovyscript/mapper/TextureBinder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ static <A, T> TextureBinder<A> of(Function<A, T> mapper, TextureBinder<T> binder
3232
static <A, T> TextureBinder<A> of(Function<A, List<T>> mapper, TextureBinder<T> binder, Function<T, String> tooltipMapper) {
3333
return o -> {
3434
var list = mapper.apply(o);
35+
if (list == null || list.isEmpty()) return Collections.emptyList();
3536
binder.apply(list.get(0));
3637
return list.stream().map(tooltipMapper).collect(Collectors.toList());
3738
};

0 commit comments

Comments
 (0)