UseItemDBLegacyModeByDefault
UseItemDBLegacyModeByDefault is a "hidden" option in leaf
What it does
it is "true" by default, this makes all items saved store in the "legacy" format which just contains a reference to a structure and a point in an entity's inventory container. this makes UIs using the Buy Button store the actual item data in the button, rather than just a reference, making exports transfer the item you buy aswell
this option does not need to be enabled all the time to utilize it, when "false" it only generates the new item format for anything you use after it and wont change any prior item save, and does not need to be "false" for the items saved in the new format to be usable when it is "true"
If you are transferring UIs between worlds using this feature, only the world you make the UI in will need the option to be "false", the other one can stay "true"
Changing the value
Since this is a LeafConfigAPI boolean option, it can be changed using the leaf:set_bool_property scriptevent
To switch to legacy format (reference mode): /scriptevent leaf:set_bool_property UseItemDBLegacyModeByDefault false To switch to new format (embed mode): /scriptevent leaf:set_bool_property UseItemDBLegacyModeByDefault true