1
0
Fork 0
TheDarkProject/mods/ENTITIES/mcl_entity_invs/api.txt

14 lines
750 B
Plaintext
Raw Normal View History

2022-09-23 05:41:52 +02:00
mcl_entity_invs
===============
Inventories for your entities. It's simple. Depend on mcl_entity_invs and register your entity like so:
* mcl_entity_invs.register_inv("entity:name","Title shown in formspec",inventory_size,disable_on_righclick)
*If disable_on_righclick is true other mods can handle when to show the inventory themselves
2022-10-01 23:47:06 +02:00
* The inventory size can be set dynamically by initializing it with an explicit nil
2022-10-01 23:47:06 +02:00
* mcl_entity_invs.show_inv_form(entity,clicker,[formspec text])
* formspec_text is an additional text that is put after the title
2022-09-23 05:41:52 +02:00
It works by setting up a detached inventory per entity which is accessed by an id/hash generated from the entities position at creation, the progressed gametime at creation and a random salt.