reworked script host, working on nbttags

This commit is contained in:
gnembon committed 2019-07-19 09:45:15 -03:00
1 parent 5e404d62be
commit 239e7006a5
11 files changed
+175 -51

No files matched your search

@@ -316,6 +316,17 @@ public class ListValue extends Value
return (double)items.size();
}
@Override
public Value getElementAt(Value value)
{
long index = NumericValue.asNumber(value).getLong();
int numitems = items.size();
long range = abs(index)/numitems;
index += (range+2)*numitems;
index = index % numitems;
return items.get((int)index);
}
}