Update write method signatures
This commit is contained in:
parent
c867982482
commit
270302bb4b
1 changed files with 6 additions and 2 deletions
|
@ -33,11 +33,15 @@ class NbtIo {
|
||||||
return Tag.readNamedTag(_io) as CompoundTag;
|
return Tag.readNamedTag(_io) as CompoundTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> write(String file) async {
|
static Future<void> write(String file, CompoundTag tag) async {
|
||||||
|
_io = ByteLayer();
|
||||||
|
Tag.writeNamedTag(tag, _io);
|
||||||
await _io.writeToFile(file);
|
await _io.writeToFile(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> writeCompressed(String file) async {
|
static Future<void> writeCompressed(String file, CompoundTag tag) async {
|
||||||
|
_io = ByteLayer();
|
||||||
|
Tag.writeNamedTag(tag, _io);
|
||||||
await _io.compress();
|
await _io.compress();
|
||||||
await _io.writeToFile(file);
|
await _io.writeToFile(file);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue