diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua
index 4ad960bc..8b585e53 100644
--- a/mods/ENTITIES/mcl_mobs/api.lua
+++ b/mods/ENTITIES/mcl_mobs/api.lua
@@ -4357,6 +4357,8 @@ function mobs:feed_tame(self, clicker, feed_count, breed, tame)
clicker:set_wielded_item(item)
end
+ mob_sound(self, "eat", nil, true)
+
-- increase health
self.health = self.health + 4
diff --git a/mods/ENTITIES/mcl_mobs/api.txt b/mods/ENTITIES/mcl_mobs/api.txt
index fa3510ca..ba4ec4bd 100644
--- a/mods/ENTITIES/mcl_mobs/api.txt
+++ b/mods/ENTITIES/mcl_mobs/api.txt
@@ -145,6 +145,7 @@ functions needed for the mob to work properly which contains the following:
'base_pitch' base pitch to use adult mobs, default is 1.0 (MCL2 extension)
'random' played randomly from time to time.
also played for overfeeding animal.
+ 'eat' played when mob eats something
'war_cry' what you hear when mob starts to attack player. (currently disabled)
'attack' what you hear when being attacked.
'shoot_attack' sound played when mob shoots.
diff --git a/mods/ENTITIES/mobs_mc/LICENSE-media.md b/mods/ENTITIES/mobs_mc/LICENSE-media.md
index e77d8cb3..30c42c74 100644
--- a/mods/ENTITIES/mobs_mc/LICENSE-media.md
+++ b/mods/ENTITIES/mobs_mc/LICENSE-media.md
@@ -236,6 +236,9 @@ Origin of those models:
* [kbnevel](https://freesound.org/people/kbnevel/)
* `mobs_mc_magma_cube_attack.ogg` (CC0)
* Derived from:
+* [InspectorJ](https://freesound.org/people/InspectorJ/sounds/429591/)
+ * `mobs_mc_animal_eat_generic.ogg` (CC BY 3.0)
+ * Source:
Note: Many of these sounds have been more or less modified to fit the game.
diff --git a/mods/ENTITIES/mobs_mc/chicken.lua b/mods/ENTITIES/mobs_mc/chicken.lua
index 68b055ac..23f63ec3 100644
--- a/mods/ENTITIES/mobs_mc/chicken.lua
+++ b/mods/ENTITIES/mobs_mc/chicken.lua
@@ -42,12 +42,14 @@ mobs:register_mob("mobs_mc:chicken", {
random = "mobs_mc_chicken_buck",
damage = "mobs_mc_chicken_hurt",
death = "mobs_mc_chicken_hurt",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
sounds_child = {
random = "mobs_mc_chicken_child",
damage = "mobs_mc_chicken_child",
death = "mobs_mc_chicken_child",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
animation = {
diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua
index 767bfd15..6eb6f6f5 100644
--- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua
+++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua
@@ -32,6 +32,7 @@ local cow_def = {
random = "mobs_mc_cow",
damage = "mobs_mc_cow_hurt",
death = "mobs_mc_cow_hurt",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
animation = {
diff --git a/mods/ENTITIES/mobs_mc/horse.lua b/mods/ENTITIES/mobs_mc/horse.lua
index d4bfd9af..76bbafc4 100644
--- a/mods/ENTITIES/mobs_mc/horse.lua
+++ b/mods/ENTITIES/mobs_mc/horse.lua
@@ -106,6 +106,7 @@ local horse = {
-- TODO: Separate damage sound
damage = "mobs_mc_horse_death",
death = "mobs_mc_horse_death",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
fear_height = 4,
@@ -361,6 +362,7 @@ skeleton_horse.sounds = {
random = "mobs_mc_skeleton_random",
death = "mobs_mc_skeleton_death",
damage = "mobs_mc_skeleton_hurt",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
}
skeleton_horse.harmed_by_heal = true
@@ -380,6 +382,7 @@ zombie_horse.sounds = {
random = "mobs_mc_zombie_growl",
death = "mobs_mc_zombie_death",
damage = "mobs_mc_zombie_hurt",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
}
zombie_horse.harmed_by_heal = true
@@ -398,6 +401,7 @@ donkey.sounds = {
random = "mobs_mc_donkey_random",
damage = "mobs_mc_donkey_hurt",
death = "mobs_mc_donkey_death",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
}
donkey.visual_size = { x=horse.visual_size.x*d, y=horse.visual_size.y*d }
diff --git a/mods/ENTITIES/mobs_mc/llama.lua b/mods/ENTITIES/mobs_mc/llama.lua
index 6391e867..67a82589 100644
--- a/mods/ENTITIES/mobs_mc/llama.lua
+++ b/mods/ENTITIES/mobs_mc/llama.lua
@@ -57,6 +57,7 @@ mobs:register_mob("mobs_mc:llama", {
fear_height = 4,
sounds = {
random = "mobs_mc_llama",
+ eat = "mobs_mc_animal_eat_generic",
-- TODO: Death and damage sounds
distance = 16,
},
diff --git a/mods/ENTITIES/mobs_mc/ocelot.lua b/mods/ENTITIES/mobs_mc/ocelot.lua
index 89a41fe4..d2361bea 100644
--- a/mods/ENTITIES/mobs_mc/ocelot.lua
+++ b/mods/ENTITIES/mobs_mc/ocelot.lua
@@ -49,6 +49,7 @@ local ocelot = {
sounds = {
damage = "mobs_mc_ocelot_hurt",
death = "mobs_mc_ocelot_hurt",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
animation = {
@@ -113,6 +114,7 @@ cat.sounds = {
random = "mobs_mc_cat_idle",
damage = "mobs_mc_cat_hiss",
death = "mobs_mc_ocelot_hurt",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
}
cat.on_rightclick = function(self, clicker)
diff --git a/mods/ENTITIES/mobs_mc/parrot.lua b/mods/ENTITIES/mobs_mc/parrot.lua
index 1773e914..28a0a85a 100644
--- a/mods/ENTITIES/mobs_mc/parrot.lua
+++ b/mods/ENTITIES/mobs_mc/parrot.lua
@@ -28,6 +28,7 @@ mobs:register_mob("mobs_mc:parrot", {
random = "mobs_mc_parrot_random",
damage = {name="mobs_mc_parrot_hurt", gain=0.3},
death = {name="mobs_mc_parrot_death", gain=0.6},
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
drops = {
@@ -67,6 +68,7 @@ mobs:register_mob("mobs_mc:parrot", {
local item = clicker:get_wielded_item()
-- Kill parrot if fed with cookie
if item:get_name() == mobs_mc.items.cookie then
+ minetest.sound_play("mobs_mc_animal_eat_generic", {object = self.object, max_hear_distance=16}, true)
self.health = 0
-- Doomed to die
self._doomed = true
diff --git a/mods/ENTITIES/mobs_mc/pig.lua b/mods/ENTITIES/mobs_mc/pig.lua
index c59ffdab..6f4fc887 100644
--- a/mods/ENTITIES/mobs_mc/pig.lua
+++ b/mods/ENTITIES/mobs_mc/pig.lua
@@ -32,6 +32,7 @@ mobs:register_mob("mobs_mc:pig", {
random = "mobs_pig",
death = "mobs_pig_angry",
damage = "mobs_pig",
+ eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
animation = {
diff --git a/mods/ENTITIES/mobs_mc/rabbit.lua b/mods/ENTITIES/mobs_mc/rabbit.lua
index 783a24ff..d48d0ded 100644
--- a/mods/ENTITIES/mobs_mc/rabbit.lua
+++ b/mods/ENTITIES/mobs_mc/rabbit.lua
@@ -23,7 +23,11 @@ local rabbit = {
{"mobs_mc_rabbit_black.png"},
},
visual_size = {x=1.5, y=1.5},
- -- TODO: sounds: random, damage, death
+ sounds = {
+ -- TODO: sounds: random, damage, death
+ eat = "mobs_mc_animal_eat_generic",
+ distance = 16,
+ },
makes_footstep_sound = false,
walk_velocity = 1,
run_velocity = 3.7,
diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua
index 374ea4b5..702f2d79 100644
--- a/mods/ENTITIES/mobs_mc/sheep.lua
+++ b/mods/ENTITIES/mobs_mc/sheep.lua
@@ -73,6 +73,7 @@ mobs:register_mob("mobs_mc:sheep", {
random = "mobs_sheep",
death = "mobs_sheep",
damage = "mobs_sheep",
+ sounds = "mobs_mc_animal_eat_generic",
distance = 16,
},
animation = {
diff --git a/mods/ENTITIES/mobs_mc/sounds/mobs_mc_animal_eat_generic.ogg b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_animal_eat_generic.ogg
new file mode 100644
index 00000000..cdf6969b
Binary files /dev/null and b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_animal_eat_generic.ogg differ
diff --git a/mods/ENTITIES/mobs_mc/wolf.lua b/mods/ENTITIES/mobs_mc/wolf.lua
index 85ba7e6b..90b73b69 100644
--- a/mods/ENTITIES/mobs_mc/wolf.lua
+++ b/mods/ENTITIES/mobs_mc/wolf.lua
@@ -39,6 +39,7 @@ local wolf = {
war_cry = "mobs_mc_wolf_growl",
damage = {name = "mobs_mc_wolf_hurt", gain=0.6},
death = {name = "mobs_mc_wolf_death", gain=0.6},
+ sounds = "mobs_mc_animal_eat_generic",
distance = 16,
},
pathfinding = 1,
@@ -71,7 +72,7 @@ local wolf = {
ent = dog:get_luaentity()
ent.owner = clicker:get_player_name()
-- cornfirm taming
- minetest.sound_play("mobs_mc_wolf_bark", {object=self.object, max_hear_distance=16})
+ minetest.sound_play("mobs_mc_wolf_bark", {object=self.object, max_hear_distance=16}, true)
self.object:remove()
end
end