Adds some helper utilities.
This commit is contained in:
parent
5d9c201e54
commit
5357da3746
4 changed files with 412 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
import 'package:libac_flutter/nbt/Stream.dart';
|
||||
import 'package:libac_flutter/nbt/Tag.dart';
|
||||
|
||||
import 'EndTag.dart';
|
||||
|
||||
class ListTag extends Tag {
|
||||
List<Tag> value = [];
|
||||
|
||||
|
@ -42,6 +44,13 @@ class ListTag extends Tag {
|
|||
}
|
||||
}
|
||||
|
||||
Tag get(int index) {
|
||||
if (size() > index)
|
||||
return value[index];
|
||||
else
|
||||
return EndTag();
|
||||
}
|
||||
|
||||
void remove(Tag tag) {
|
||||
value.remove(tag);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue