SNBT Editor implementation is now completed
This commit is contained in:
parent
410bde4c70
commit
7cb95a8ae4
2 changed files with 5 additions and 3 deletions
|
@ -35,7 +35,7 @@ class SnbtState extends State<SnbtEdit> {
|
|||
try {
|
||||
CompoundTag ct =
|
||||
(await SnbtIo.readFromString(snbt.text)).asCompoundTag();
|
||||
snbt.text = SnbtIo.writeToString(ct);
|
||||
snbt.setCursor(0);
|
||||
|
||||
setState(() {
|
||||
SessionData.ROOT_TAG = ct;
|
||||
|
@ -43,6 +43,8 @@ class SnbtState extends State<SnbtEdit> {
|
|||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text("Successfully edited NBT data")));
|
||||
|
||||
Navigator.pop(context);
|
||||
} catch (E) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
content: Text("FATAL ERROR: Your SNBT Syntax is not valid")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue