I would like to add more MoLang queries. Some of them is:
First, let's check on the "query.health". It takes one optional health property as a parameter (0 or 'value' for current health value, 1 or 'max' for max health value), and returns the requested health value that is currently being numbered (defaulting to the 0 or 'value' if no parameter is supplied) if there is one, otherwise returns 0.0. This will change entity skin based on their health modifier.
Secondly, "query.last_placed_block_name" and "query.last_placed_block_time". "query.last_placed_block_name" returns the last block identifier that has been placed by the actor, else it returns ''. And "query.last_placed_block_time" returns the time since last placed block in seconds, otherwise, returns 0.0.
After that, "query.get_inventory_item_name" gets the parameter of the inventory slot (if the actor is a player, then 0 - 9 is hotbar, the rest would be the requested inventory slot) and returns the item name of the requested slot if it makes sense, else it returns ''.
Example code according to the attached file url: [Hello, do not attach files ~ admin]
Please sign in to leave a comment.