Instakill mobs on punch in creative
This commit is contained in:
parent
c7045bc415
commit
20a30f9f44
|
@ -3148,6 +3148,10 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if minetest.is_creative_enabled(hitter:get_player_name()) then
|
||||||
|
self.health = 0
|
||||||
|
end
|
||||||
|
|
||||||
-- set/update 'drop xp' timestamp if hitted by player
|
-- set/update 'drop xp' timestamp if hitted by player
|
||||||
self.xp_timestamp = minetest.get_us_time()
|
self.xp_timestamp = minetest.get_us_time()
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user