reworked script host, working on nbttags
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user