├── API.txt ├── LICENSE.txt ├── README.txt ├── bower.json ├── changelog.txt ├── chicken ├── LICENSE.txt ├── README.txt ├── depends.txt ├── egg.lua ├── init.lua ├── models │ └── creatures_chicken.b3d ├── sounds │ ├── creatures_chicken.1.ogg │ ├── creatures_chicken.2.ogg │ ├── creatures_chicken.3.ogg │ ├── creatures_chicken_hit.1.ogg │ └── creatures_chicken_hit.2.ogg └── textures │ ├── creatures_chicken.png │ ├── creatures_chicken_brown.png │ ├── creatures_chicken_flesh.png │ ├── creatures_chicken_meat.png │ ├── creatures_chicken_white.png │ ├── creatures_egg.png │ ├── creatures_feather.png │ └── creatures_fried_egg.png ├── creatures ├── LICENSE.txt ├── README.txt ├── common.lua ├── depends.txt ├── description.txt ├── functions.lua ├── init.lua ├── items.lua ├── register.lua ├── sounds │ ├── creatures_splash.1.ogg │ └── creatures_splash.2.ogg └── textures │ ├── creatures_flesh.png │ ├── creatures_meat.png │ ├── creatures_spawn_egg.png │ └── creatures_spawner.png ├── ghost ├── LICENSE.txt ├── README.txt ├── depends.txt ├── init.lua ├── models │ ├── creatures_ghost.b3d │ └── ghost.b3d ├── sounds │ ├── creatures_ghost.1.ogg │ ├── creatures_ghost.2.ogg │ ├── creatures_ghost_death.ogg │ └── creatures_ghost_hit.ogg └── textures │ ├── creatures_egg_ghost.png │ └── creatures_ghost.png ├── modpack.txt ├── oerkki ├── LICENSE.txt ├── README.txt ├── depends.txt ├── init.lua ├── models │ └── creatures_oerkki.b3d ├── sounds │ ├── creatures_oerkki_attack.ogg │ ├── creatures_oerkki_hit.1.ogg │ ├── creatures_oerkki_hit.2.ogg │ ├── creatures_oerkki_idle.1.ogg │ └── creatures_oerkki_idle.2.ogg └── textures │ ├── creatures_egg_oerkki.png │ └── creatures_oerkki.png ├── screenshot.png ├── sheep ├── LICENSE.txt ├── README.txt ├── depends.txt ├── init.lua ├── models │ └── creatures_sheep.b3d ├── sounds │ ├── creatures_shears.ogg │ ├── creatures_sheep.1.ogg │ ├── creatures_sheep.2.ogg │ └── creatures_sheep.3.ogg └── textures │ ├── creatures_egg_sheep.png │ ├── creatures_shears.png │ ├── creatures_sheep.png │ ├── creatures_sheep_black.png │ ├── creatures_sheep_brown.png │ ├── creatures_sheep_grey.png │ ├── creatures_sheep_shaved.png │ └── creatures_sheep_white.png └── zombie ├── LICENSE.txt ├── README.txt ├── depends.txt ├── init.lua ├── models └── creatures_zombie.b3d ├── sounds ├── creatures_zombie.1.ogg ├── creatures_zombie.2.ogg ├── creatures_zombie.3.ogg ├── creatures_zombie_death.ogg └── creatures_zombie_hit.ogg └── textures ├── creatures_egg_zombie.png ├── creatures_rotten_flesh.png └── creatures_zombie.png /API.txt: -------------------------------------------------------------------------------- 1 | Creatures MOB-Engine API 2 | ------------------------ 3 | 4 | creatures.register_mob(#Creature definition) 5 | -registers a mob at MOB-Engine; returns true when sucessfull 6 | 7 | creatures.register_alias(old_mob, new_mob) -- returns true if sucessfull 8 | -registers an alias for other mob, e.g. from other mods or removed ones. 9 | existent entities (MOBs), Spawners and Spawn Eggs are converted; 10 | returns true when sucessfull 11 | ^ old_mob: name as string, e.g. "creatures:oerrki" 12 | ^ new_mob: name as string, e.g. "creatures:oerkki" 13 | ^ example: creatures.register_alias("creatures:oerrki", "creatures:oerkki") 14 | 15 | creatures.rnd(chance_table) 16 | -returns a weighted random table element; chance_sum of table must be 1 17 | ^ example: creatures.rnd({elem1 = {chance = 0.7}, {elem2 = {chance = 0.3}}) 18 | 19 | creatures.compare_pos(pos1, pos2) 20 | -returns true if pos1 == pos2 21 | 22 | creatures.findTarget(search_obj, pos, radius, search_type, mob_name, xray, no_count) 23 | -returns table of found objects (as ObjectRef) and boolean player_near 24 | ^ search_obj is searching object; can be nil 25 | ^ pos is starting position for search radius 26 | ^ radius for searching in blocks/node 27 | ^ search_type that specifies returned object requirements 28 | ^ "all" -- returns every object except dropped Items 29 | ^ "hostile" -- returns every object(creature) that has hostile setting or is player 30 | ^ ignores "mob_type" if specified 31 | ^ "nonhostile" -- returns every object that is not hostile or player 32 | ^ "player" -- returns all players 33 | ^ "mates" -- returns all objects(creatures) that are of same kind 34 | ^ requires "mob_type" specifies 35 | ^ mob_type specifies creature that is ignored or searched, depending on search_type 36 | ^ xray allows searching through blocks/nodes (default == false) 37 | ^ no_count skips collecting loop and returns just the boolean player_near 38 | ^ table is empty 39 | 40 | creatures.dropItems(pos, drops) 41 | -drops items at position pos 42 | ^ pos where to drop Items 43 | ^ drops table in #ItemDrops format 44 | 45 | 46 | #ItemDrops 47 | ---------- 48 | { 49 | { 50 | , -- e.g. "default:wood" 51 | , -- either a or table in format {min = , max = }; optional 52 | -- "chance = ": between 0.0 and 1.0 53 | }, 54 | } 55 | 56 | Example: 57 | Will drop with a chance of 30% 1 to 3 items of type "default:wood" 58 | and with a chance of 100% 2 items of type "default:stone" 59 | { 60 | {"default:wood", {min = 1, max = 3}, chance = 0.3}, 61 | {"default:stone", 2} 62 | } 63 | 64 | 65 | #Creature definition 66 | -------------------- 67 | { 68 | name = "", -- e.g. "creatures:sheep" 69 | stats = { 70 | hp = 1, -- 1 HP = "1/2 player heart" 71 | hostile = false, -- is mob hostile (required for mode "attack") 72 | lifetime = 300, -- after which time mob despawns, in seconds 73 | dies_when_tamed = false, -- stop despawn when tamed 74 | can_jump = 1, -- height in nodes 75 | can_swim = false, -- can mob swim or will it drown 76 | can_fly = false, -- allows to fly (requires mode "fly") and disable step sounds 77 | can_burn = false, -- takes damage of lava 78 | can_panic = false, -- runs fast around when hit (requires mode "walk") 79 | has_falldamage = false, -- deals damage if falling more than 3 blocks 80 | has_kockback = false, -- get knocked back when hit 81 | sneaky = false, -- disables step sounds 82 | light = {min, max}, -- which light level will burn creature (requires can_burn = true) 83 | }, 84 | 85 | modes = { 86 | idle = {chance = , duration =