#How to see what is saved into dynamic properties?

1 messages · Page 1 of 1 (latest)

wooden drift
#

Is it possible to view this data from outside the game? I'm storing JSON.stringify'd values, but am having trouble recreating them, so I need to know what the string looks like. I've tried player.sendMessage() but it shows me {Object object} at best.

heavy aurora
#

player.sendMessage(JSON.stringify(world.getDynamicProperty("db") ?? 0 ))

wooden drift
heavy aurora
#

well, what did u set?

wooden drift
#

I'm trying to save the players inventory, which contains 29 raw salmon.

heavy aurora
#

well, item is not an ordinary object

wooden drift
#

What do you mean?

heavy aurora
#

item cant be saved into string

wooden drift
#

There's a number of topics here saying to save inventory essentially like this (with JSON.stringify). How would I go about saving the inventory?

heavy aurora
#

it's a lot complicated than just stringify

wooden drift
#

Yea, I figured... I'll probably have to do something like manually save each aspect of an ItemStack into a string

#

But that aside, do you know if there's a way to access such data outside the game, or where it is stored? Like the file name, and/or program to access it?

heavy aurora
#

nope

#

thats why its called api

wooden drift
#

Well the dynamic property data gets stored on our end. Mojang doesn't hold it for us.

#

It's gotta be somewhere in /minecraftWorlds

#

I'd guess it's in minecraftWorlds/sadfkhkhsd/db/00128.ldb file, but I haven't gotten to accessing it yet

wooden drift
#

Thank you, I know js very well already 😂. The issue is that there isn't anything being output to verify, and there isn't an option to step into the code that I'm aware of. That leaves me with the only option of seeing what data is being written into storage, and reconstructing the object based on that.

peak crane