0
0
Fork 0

Instakill mobs on punch in creative

This commit is contained in:
cora 2022-09-13 03:39:59 +02:00 committed by Gitea
parent c7045bc415
commit 20a30f9f44
1 changed files with 4 additions and 0 deletions

View File

@ -3148,6 +3148,10 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
return
end
if minetest.is_creative_enabled(hitter:get_player_name()) then
self.health = 0
end
-- set/update 'drop xp' timestamp if hitted by player
self.xp_timestamp = minetest.get_us_time()
end