AutoAsteroid/script-api-database ? reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight database helper for Minecraft Bedrock Script API that I can drop into a behavior pack and use right away.

I want it to let me save and read normal JavaScript data like objects, arrays, numbers, booleans, and null using simple calls like get, set, has, delete, keys, and size. It should work on world and entities through easy access like database or db, and it should handle big values by splitting them up so I do not hit the Script API property size limit.

Please also include a way to save and load JSON files outside the game using a small local bridge, so I can store data persistently when needed. Keep it fast, simple, and memory friendly, with caching so repeated reads are quick.

If anything is unclear, look up the current Bedrock Script API docs online and make it work cleanly with the latest version.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab