This mod, Forked from PilzAdam's [Simple Mobs](https://forum.minetest.net/viewtopic.php?id=3063), adds some basic hostile and friendly mobs to the game. It includes additional mobs and rotton meat, which were originally provided in another mod called [my_mobs](https://forum.minetest.net/viewtopic.php?f=11&t=4082). However my_mobs cages has not been included.
Since the [original](https://github.com/PilzAdam/mobs) mod is no longer maintained and the author of my_mobs wished to continue it's development, the two have been merged.
For each **animal** and **monster**, there is a setting for them to be *disabled*. They will not spawn if disabled, but will still be registered in case a world already has them. Any residual mobs that are disabled will be removed once the world is loaded again. Additionally, if a mob can be drawn with a 3D *mesh* or 2D *sprite* then there is an option to select which to use.
- [x]**Rabbits** are cute little critters that you can pick up. They are tasty when cooked. They like berries and carrots, but are shy and get spooked easy. They can be white, grey, or brown.
Mobs are added using the **mobs:register_mob(name, def)** function, where `name` is the name of the mob. The entity should then be referenced as `"mob:name"`. The`def` parameter is a table with all the defining attributes of the mob. For the most part, these are the same as in `minetest.register_entity()`. Other attributes are described below:
Mobs start out in the **stand**ing state. They will then start **walk**ing around randomly, ocasionally stopping to *stand* around again. If a `monster` type notices a player--and damage is enabled--the mob will give **chase**! If the player is holding something that a mob likes to follow, it will do so in the *chase* state. Once in range, mobs in the *chase* state will attack (if they have an attack). There is also a **flee** state in which mobs will run away from a target. When the target a mob is attacking or fleeing from dies, or otherwise is out of view, they will stop and *stand* again. If a player stops wielding an item that a mob follows, then it will stop *chase*ing--unless, of course, it still wants to attack.
Besides the regular [entity](https://dev.minetest.net/LuaEntitySAO) callbacks, the mobs api adds some more that you may take advantage of. Additionally, there are helper functions availabe for assisting in the implementation of these callbacks.
Monsters should provide an attack method in order to inflict damage on players. The function receives two parameters, the `self` entity which is performing the attack and the `target` of the attack. The target will be a table with **player**, **pos**ition, and **dist**ance attributes. Return *true* if the attack was performed, or else *false*.
The mob entity has a a `self.timer` which should be checked to control how often the attack will take place. This is handled automatically if you use the provided `mobs:slap` method. *However, if you wish for your mob to shoot: you will need to register the projectile via `mobs:register_arrow`, and verify/update the timing yourself as is done by the Dungeon Master mob.*
The mob's optional `follow` callback is used to check if a player is wielding something the mob likes. The input `item` will be the wielded item's name. The function should return `true` if the mob is attracted to the item.
*You don't need to provide a callback to handle mobs jumping.* However, you may. Or if you simply want to *prevent* a mob from jumping, use something like the following for your mob:
Projectiles can be registered with this function, and then be launched using the `mobs:shoot` function. They are referened by `name` such as the Dungeon Master's `mobs:fireball`. The `def`inition is a table with attributes with the following values:
-`visual` = "cube" or "sprite" or "upright_sprite", [TODO: "mesh"]
-`visual_size` = {x,y},
-`textures` = a table of textures, the quantity of which depend on *visual*,
-`velocity` = the speed with which the projectile witll travel on its trajectory,
-`hit_player` = a callback function(self, player) to be called when the projectile hits a player,
-`hit_node` = a callback function(self, pos, node) to be called when the projectile hits a node
Punch the `target` with `damage` damage groups for use as an `attack` callback. This is what most mobs use. For example:
attack = function(self, target)
return mobs:slap(self, target.player, {fleshy=2})
end
##### mobs:shoot(name, pos, target) #####
Launch projectiles at a target. `name` is the name of the projectile. `pos` and `target` are the *positions* of the shooter and the target respectively.
- [ ] When an entity is slain both the `on_punch` and `on_death` callbacks are triggered. So, if you have sounds for punch and death both will be heard. Take this into account while creating your sounds.
The cow texture was created by [rinoux](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=1128). It was retrieved from the [mobf](https://wiki.minetest.net/Mods/MOB_Framework) mod by [sapier](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=231). The cow's dry-up sound came from there too, which reports that the graphic is under WTFPL and the [sound](http://commons.wikimedia.org/wiki/Category:Mudchute_Park_and_Farm) was created by [Secretlondon](http://commons.wikimedia.org/wiki/User:Secretlondon).
The rabbit and rat textures were acquired from cornernote's [critters](http://minetest.net/forum/viewtopic.php?id=3337) modpack. It's README.txt reports:
By accessing this folder, you are agreeing to be bound by these folder Terms and Conditions of Use, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this folder. The materials contained in this folder are protected by applicable copyright and trade mark law.
Permission is granted to temporarily download one copy of the materials (icons) on Graphics-and-desktop-icons.com for personal or commercial use. This is the grant of a license, not a transfer of title, and under this license you may not:
- transfer the materials to another person or "mirror" the materials on any other server unless a static link is provide to Graphics-and-desktop-icons.com's homepage.
This license shall automatically terminate if you violate any of these restrictions and may be terminated by Graphics-and-desktop-icons.com at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.
The materials provided through services by Graphics-and-desktop-icons.com or its owner are provided "as is". Graphics-and-desktop-icons.com and its owner makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Further, Graphics-and-desktop-icons.com and its owner does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials provided by Graphics-and-desktop-icons.com and its owner or otherwise relating to such materials.
In no event shall Graphics-and-desktop-icons.com, its owner or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption,) arising out of the use or inability to use the materials provided by Graphics-and-desktop-icons.com or its owner, even if Graphics-and-desktop-icons.com or its owner has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.
Any claim relating to Graphics-and-desktop-icons.com or its owner shall be governed by the laws of the State of Graphics-and-desktop-icons.com or its owner without regard to its conflict of law provisions.
The materials on Graphics-and-desktop-icons.com are provided "as is". Graphics-and-desktop-icons.com makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Further, Graphics-and-desktop-icons.com does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its Internet web site or otherwise relating to such materials or on any sites linked to this site.
In no event shall Graphics-and-desktop-icons.com or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption,) arising out of the use or inability to use the materials on Graphics-and-desktop-icons.com Internet site, even if Graphics-and-desktop-icons.com or a Graphics-and-desktop-icons.com authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you.
The materials appearing on Graphics-and-desktop-icons.com could include technical, typographical, or photographic errors. Graphics-and-desktop-icons.com does not warrant that any of the materials on its web site are accurate, complete, or current. Graphics-and-desktop-icons.com may make changes to the materials contained on its web site at any time without notice.
Graphics-and-desktop-icons.com has not reviewed all of the sites linked to its Internet web site and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement by Graphics-and-desktop-icons.com of the site. Use of any such linked web site is at the user's own risk.
Graphics-and-desktop-icons.com may revise these terms of use for its web site at any time without notice. By using this web site you are agreeing to be bound by the then current version of these Terms and Conditions of Use.
Any claim relating to Graphics-and-desktop-icons.com shall be governed by the laws of the State of Graphics-and-desktop-icons.com without regard to its conflict of law provisions.
The rest of the sounds were found at various locations that I don't recall, unless otherwise acknowledged in changes.txt. If you own one of them, I will remove it and delete all copies of it, at you're request.