Adds some helper utilities.

This commit is contained in:
zontreck 2024-05-06 01:56:09 -07:00
parent 5d9c201e54
commit 5357da3746
4 changed files with 412 additions and 0 deletions

View file

@ -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);
}