Fix being unable to load NBT in web viewer

This commit is contained in:
zontreck 2025-05-25 14:05:43 -07:00
parent 7b05ed2a4a
commit 596203378b
3 changed files with 6 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class TTConsts {
static get SESSION_SERVER =>
"https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php";
static const VERSION = "1.0.0-beta.19";
static const VERSION = "1.0.0-beta.20";
static bool UPDATE_AVAILABLE = false;
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta;

View file

@ -358,6 +358,7 @@ class SessionData {
}
ListTag poses = ct.get("pos")! as ListTag;
positions.clear();
for (var pos in poses.value) {
positions.add(await SmallPosition.fromNBT(pos.asCompoundTag()));
}
@ -461,6 +462,9 @@ class SessionData {
// Convert this to a CompoundTag
CompoundTag ct = await NbtIo.readFromStream(lst) as CompoundTag;
_deserialize(ct);
IsReadOnly = true;
isWeb = true;
return true;
} else
return false;