1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2024-12-22 17:00:26 +01:00

egg punches as player

This commit is contained in:
TenPlus1 2017-03-26 20:33:06 +01:00
parent 977a16f7b6
commit c674ee82ed

View File

@ -31,7 +31,6 @@ mobs:register_mob("mobs_animal:chicken", {
walk_velocity = 1, walk_velocity = 1,
run_velocity = 3, run_velocity = 3,
runaway = true, runaway = true,
jump = true,
drops = { drops = {
{name = "mobs:chicken_raw", chance = 1, min = 2, max = 2}, {name = "mobs:chicken_raw", chance = 1, min = 2, max = 2},
}, },
@ -113,14 +112,14 @@ mobs:register_arrow("mobs_animal:egg_entity", {
velocity = 6, velocity = 6,
hit_player = function(self, player) hit_player = function(self, player)
player:punch(self.object, 1.0, { player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = 1}, damage_groups = {fleshy = 1},
}, nil) }, nil)
end, end,
hit_mob = function(self, player) hit_mob = function(self, player)
player:punch(self.object, 1.0, { player:punch(minetest.get_player_by_name(self.playername) or self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = 1}, damage_groups = {fleshy = 1},
}, nil) }, nil)