1
0
Fork 0

Merge pull request 'Make mobs drop xp on death' (#1641) from jordan4ibanez/MineClone2:mineclone5 into mineclone5

Reviewed-on: MineClone2/MineClone2#1641
This commit is contained in:
jordan4ibanez 2021-04-25 02:28:57 +00:00
commit 79871ca191
2 changed files with 4 additions and 3 deletions

View File

@ -213,9 +213,8 @@ function mobs:register_mob(name, def)
rotate = def.rotate or 0, -- 0=front, 90=side, 180=back, 270=side2 rotate = def.rotate or 0, -- 0=front, 90=side, 180=back, 270=side2
hp_min = scale_difficulty(def.hp_min, 5, 1), hp_min = scale_difficulty(def.hp_min, 5, 1),
hp_max = scale_difficulty(def.hp_max, 10, 1), hp_max = scale_difficulty(def.hp_max, 10, 1),
xp_min = def.xp_min or 0, xp_min = def.xp_min or 1,
xp_max = def.xp_max or 3, xp_max = def.xp_max or 5,
xp_timestamp = 0,
breath_max = def.breath_max or 15, breath_max = def.breath_max or 15,
breathes_in_water = def.breathes_in_water or false, breathes_in_water = def.breathes_in_water or false,
physical = true, physical = true,

View File

@ -116,6 +116,8 @@ mobs.death_logic = function(self, dtime)
mobs.death_effect(self) mobs.death_effect(self)
mcl_experience.throw_experience(self.object:get_pos(), math_random(self.xp_min, self.xp_max))
self.object:remove() self.object:remove()
return return