summaryrefslogtreecommitdiff
path: root/chicken.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-03-26 20:33:06 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-03-26 20:33:06 +0100
commitc674ee82edf48b0c78bb0fe6fb0bfa2dbe197943 (patch)
tree212d37c04c0bfdf5970f71dbfc34a9bc9b56a8c7 /chicken.lua
parent977a16f7b68de93189aded5d0bc2846f8b21a8f7 (diff)
egg punches as player
Diffstat (limited to 'chicken.lua')
-rw-r--r--chicken.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/chicken.lua b/chicken.lua
index 11cc4b7..7a21286 100644
--- a/chicken.lua
+++ b/chicken.lua
@@ -31,7 +31,6 @@ mobs:register_mob("mobs_animal:chicken", {
walk_velocity = 1,
run_velocity = 3,
runaway = true,
- jump = true,
drops = {
{name = "mobs:chicken_raw", chance = 1, min = 2, max = 2},
},
@@ -113,14 +112,14 @@ mobs:register_arrow("mobs_animal:egg_entity", {
velocity = 6,
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,
damage_groups = {fleshy = 1},
}, nil)
end,
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,
damage_groups = {fleshy = 1},
}, nil)