Added angry pig sound, cows attack when threatened
This commit is contained in:
parent
f56d969d00
commit
33a65e58f5
4
cow.lua
4
cow.lua
@ -4,10 +4,10 @@
|
|||||||
mobs:register_mob("mobs:cow", {
|
mobs:register_mob("mobs:cow", {
|
||||||
-- animal, monster, npc, barbarian
|
-- animal, monster, npc, barbarian
|
||||||
type = "animal",
|
type = "animal",
|
||||||
-- aggressive, does 5 damage to player when threatened
|
-- aggressive, does 4 damage to player when threatened
|
||||||
passive = false,
|
passive = false,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
damage = 5,
|
damage = 4,
|
||||||
-- health & armor
|
-- health & armor
|
||||||
hp_min = 5, hp_max = 20, armor = 200,
|
hp_min = 5, hp_max = 20, armor = 200,
|
||||||
-- textures and model
|
-- textures and model
|
||||||
|
BIN
sounds/mobs_pig_angry.ogg
Normal file
BIN
sounds/mobs_pig_angry.ogg
Normal file
Binary file not shown.
@ -23,14 +23,15 @@ mobs:register_mob("mobs:pumba", {
|
|||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "mobs_pig",
|
random = "mobs_pig",
|
||||||
|
attack = "mobs_pig_angry",
|
||||||
},
|
},
|
||||||
-- speed and jump
|
-- speed and jump
|
||||||
walk_velocity = 2,
|
walk_velocity = 2,
|
||||||
run_velocity = 3,
|
run_velocity = 3,
|
||||||
jump = true,
|
jump = true,
|
||||||
-- follows wheat
|
-- follows wheat
|
||||||
follow = "farming:wheat",
|
follow = "default:apple",
|
||||||
view_range = 5,
|
view_range = 10,
|
||||||
-- drops raw pork when dead
|
-- drops raw pork when dead
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs:pork_raw",
|
{name = "mobs:pork_raw",
|
||||||
@ -50,7 +51,7 @@ mobs:register_mob("mobs:pumba", {
|
|||||||
-- can be tamed by feeding 8 wheat (will not attack when tamed)
|
-- can be tamed by feeding 8 wheat (will not attack when tamed)
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
if item:get_name() == "farming:wheat" then
|
if item:get_name() == "default:apple" then
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
item:take_item()
|
item:take_item()
|
||||||
clicker:set_wielded_item(item)
|
clicker:set_wielded_item(item)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user