Implement SNBT write to file
This commit is contained in:
parent
daf9cb7376
commit
0766a43622
1 changed files with 14 additions and 1 deletions
|
@ -1 +1,14 @@
|
|||
class SnbtIo {}
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:libac_flutter/nbt/Stream.dart';
|
||||
import 'package:libac_flutter/nbt/Tag.dart';
|
||||
import 'package:libac_flutter/nbt/impl/CompoundTag.dart';
|
||||
|
||||
class SnbtIo {
|
||||
static void write(String file, CompoundTag tag) {
|
||||
File handle = File(file);
|
||||
StringBuilder builder = StringBuilder();
|
||||
Tag.writeStringifiedNamedTag(tag, builder, 0);
|
||||
handle.writeAsString(builder.toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue