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

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