master #5

Merged
epCode merged 255 commits from VoxeLibre/VoxeLibre:master into master 2021-02-02 23:20:01 +01:00
1 changed files with 4 additions and 6 deletions
Showing only changes of commit 7210dfcc1c - Show all commits

View File

@ -789,18 +789,16 @@ local check_for_death = function(self, cause, cmi_cause)
local puncher = cmi_cause.puncher
if puncher then
wielditem = puncher:get_wielded_item()
if mod_experience and ((not self.child) or self.type ~= "animal") then
mcl_experience.throw_experience(self.object:get_pos(), math.random(self.xp_min, self.xp_max))
end
end
end
local cooked = mcl_burning.is_burning(self.object) or mcl_enchanting.has_enchantment(wielditem, "fire_aspect")
local looting = mcl_enchanting.get_enchantment(wielditem, "looting")
item_drop(self, cooked, looting)
end
local pos = self.object:get_pos()
if mod_experience and ((not self.child) or self.type ~= "animal") then
mcl_experience.throw_experience(pos, math.random(self.xp_min, self.xp_max))
end
end
-- execute custom death function