diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-03-07 11:50:15 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-03-07 11:50:15 +0000 |
commit | 1fbf0ff331dec9074d87ed71563214a086e143c4 (patch) | |
tree | 7131168329e2f8a44654c1b11ba4f57aa9782a7e /api.txt | |
parent | c1c17a6849f97036ccb8f1a9dfea17f123a0187a (diff) |
Updated replace function with new tables
Diffstat (limited to 'api.txt')
-rw-r--r-- | api.txt | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,5 +1,5 @@ -MOB API (6th March 2017) +MOB API (7th March 2017) The mob api is a function that can be called on by other mods to add new animals or monsters into minetest. @@ -102,11 +102,18 @@ This functions registers a new mob as a Minetest entity. 'jump' sound when jumping 'explode' sound when exploding 'distance' maximum distance sounds are heard from (default is 10) + +Mobs can look for specific nodes as they walk and replace them to mimic eating + 'replace_what' group if items to replace e.g. {"farming:wheat_8", "farming:carrot_8"} 'replace_with' replace with what e.g. "air" or in chickens case "mobs:egg" 'replace_rate' how random should the replace rate be (typically 10) 'replace_offset' +/- value to check specific node to replace +The 'replace_what' has been updated to use tables for what, with and y_offset e.g. + + replace_what = { {"group:grass", "air", 0}, {"default:dirt_with_grass", "default:dirt", -1} } + Mob animation comes in three parts, start_frame, end_frame and frame_speed which can be added to the mob definition under pre-defined mob animation names like: |