Merge branch 'master' into 1.17

# Conflicts:
#	src/main/resources/carpet.mixins.json
This commit is contained in:
gnembon committed 2021-06-13 11:47:56 -03:00
commit dc38cd272f
7 files changed
+40 -24

No files matched your search

@@ -436,8 +436,9 @@ public class ListValue extends AbstractListValue implements ContainerValueInterf
@Override
public Value get(Value value)
{
long index = NumericValue.asNumber(value, "'address' to a list index").getLong();
return items.get(normalizeIndex(index, items.size()));
int size = items.size();
if (size == 0) return Value.NULL;
return items.get(normalizeIndex(NumericValue.asNumber(value, "'address' to a list index").getLong(), size));
}
@Override