-- Standard Rat. Descended from PilzAdam version. -- =================================================================== local lcname = "rat" local ucname = "Standard Rat" local msname = "codermobs_" .. lcname local obj_name = "codermobs:" .. lcname -- =================================================================== mobs_param = { lcname = lcname , ucname = ucname , obj_name = obj_name , aoc = 2 , spawn_chance = 150000 , day_mode = true , min_light = 10 , max_light = 20 , min_height = -31000 , max_height = 31000 , scale = 1.0 , spawn_type = "animal" , spawn_nodes = { "darkage:silt" , "default:desert_sand" , "default:dirt_with_dry_grass" , "default:dirt_with_grass" , "default:silver_sand" , "default:stone" , "earthgen:dirt_with_dry_grass" , "ethereal:green_dirt" , "ethereal:green_dirt_top" , "ethereal:grove_dirt" , "ethereal:mushroom_dirt" , "loud_walking:polluted_dirt" , "mg:dirt_with_dry_grass" , "noisegrid:grass" , } , add_egg = false , egg_image = msname .. "_inv.png" , } -- =================================================================== codermobs.adjust_param() -- =================================================================== mobs_param.core_param = { type = mobs_param.spawn_type , makes_footstep_sound = false , armor = 200 , fear_height = 2 , floats = 0 , hp_max = 4 , hp_min = 1 , stepheight = 1.2 , jump_height = 0 , jump = false , passive = true , runaway = true , run_velocity = 2 , walk_velocity = 1 , lava_damage = 4 , light_damage = 0 , water_damage = 1 , float = 0 , collisionbox = { -0.2, -1.0, -0.2, 0.2, -0.8, 0.2 } , mesh = msname .. ".b3d" , visual = "mesh" , textures = { { msname .. "_01.png" } , { msname .. "_02.png" } , } , sounds = { random = msname } , on_rightclick = function (self, clicker) mobs:capture_mob (self, clicker, 25, 80, 0, true, nil) end, --[[ do_custom = function(self) local pos = self.object:getpos() print("rat pos", pos.x, pos.y, pos.z) end, ]] } -- =================================================================== -- cooked rat, yummy! minetest.register_craftitem (obj_name .. "_cooked", { description = "Cooked Rat", inventory_image = msname .. "_cooked.png", on_use = minetest.item_eat(3), }) minetest.register_craft ({ type = "cooking", output = obj_name .. "_cooked" , recipe = obj_name, cooktime = 5, }) -- =================================================================== codermobs.setup_mob() mobs:alias_mob ("mobs:rat" , obj_name) mobs:alias_mob ("mobs_animal:rat" , obj_name) codermobs.log_done() -- =================================================================== -- End of file.