structure command doesn't save to disk
I am working on an inventory check addon for a world I'm using with my students.
My plan had been to send them through a booth that would change gamerules and then kill them to collect the inventory items and then store them in a structure file that could be later loaded when they were ready to get the inventory back.
Basically set it up so they have a separate inventory for the survival region of the world, and then the Showcase and games regions have their own inventory set.
I thought I had it all worked out. With an animation that would run all the commands in sequence and save the structure files to disk according to their scores/tags.
I have seemed to be able to get it to work, all except for the fact that it only seems to be saving the structures into memory rather than saving them to disk.
So as soon as I close the world and open it again, it is not working properly since all the items are lost.
I have tried saving them using structure blocks too, but they only seem to be saving to memory and I see no way to export them using commands or redstone.
-
Well, as I understand it, the save to memory just puts the info in the clipboard, so I agree with your assessment that you need to export to disk to be most useful. I don't know how to help with that. I'm afraid. I assume you would need to supply a filepath name, though.
I do have a possible solution, though. If you pick up the objects, and put them in a chest, or in the agent's inventory, you can use Python Notebook commands to make a list of the items/blocks and the count of each. As long as the code is still running, the data will persevere, and when the student returns to the world, the data can be used to give the items back to the player.
If you want items to last past a close and reopen, I guess I am not familiar enough with the gameplay you are setting up to understand why the players can't have their own chest holding their stuff for each area. Would that work?
I love trying to track along with your projects! Hope everything is growing nicely where you are!
0
Please sign in to leave a comment.
Comments
1 comment