
local S = mobs.intllib


-- Rat by PilzAdam

mobs:register_mob("mobs_animal:rat", {
	type = "monster",
	hp_min = 1,
	hp_max = 2,
	attack_type = "dogfight",
	-- docile_by_day=true,
	damage=1,
	reach=1.5,
	view_range=10,
	collisionbox = {-0.2, -1, -0.2, 0.2, -0.8, 0.2},
	visual = "mesh",
	mesh = "mobs_rat.b3d",
	textures = {
		{"mobs_rat.png"},
		{"mobs_rat2.png"},
	},
	makes_footstep_sound = false,
	sounds = {
		random = "mobs_rat",
	},
	walk_velocity = 3,
	run_velocity = 4,
	runaway = true,
	jump = true,
	water_damage = 1,
	lava_damage = 4,
	fear_height = 99,
	env_alt = {
		["flowers:mushroom_brown"]={ "air", 15},
		["farming:wheat"]={ "air", 10},
		["farming:cotton"]={ "air", 10},
	},
})


--[[
mobs:spawn({
	name = "mobs_animal:rat",
	nodes={"flowers:mushroom_brown", "group:wood"},
	active_object_count = 5,
	max_height = 120,
	chance=500,
	interval=23,
	max_light=4,
})

mobs:register_egg("mobs_animal:rat", S("Rat"), "mobs_rat_inventory.png", 0)
]]


