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_tick". "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_tick" returns the time since last placed block in Minecraft ticks, 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 ''.
I hope this feedback is really important for map makers, currently for the MoLang intergration.
Example code according to the attached file url: [external link removed by admin]
Please sign in to leave a comment.