diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index 341e28984..7ffa62ffe 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -681,6 +681,9 @@ function mob_class:do_env_damage() -- don't fall when on ignore, just stand still if self.standing_in == "ignore" then self.object:set_velocity({x = 0, y = 0, z = 0}) + -- wither rose effect + elseif self.standing_in == "mcl_flowers:wither_rose" then + mcl_potions.withering_func(self.object, 1, 2) end local nodef = minetest.registered_nodes[self.standing_in] diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 5f88c18ad..8a87c92ac 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -161,7 +161,6 @@ mcl_mobs.register_mob("mobs_mc:wither", { if self._custom_timer > 1 then self.health = math.min(self.health + 1, self.hp_max) self._custom_timer = self._custom_timer - 1 - self._xplded_lately = false end if anti_troll and self._spawner then diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index b2bc3fc96..6f2e275df 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -734,10 +734,6 @@ function mcl_potions.healing_func(player, hp) local obj = player:get_luaentity() - if player:get_hp() == 0 then - return - end - if obj and obj.harmed_by_heal then hp = -hp end if hp > 0 then diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index 58572698c..73fcdae16 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -474,21 +474,16 @@ mcl_mobs.effect_functions["heal"] = mcl_potions.healing_func mcl_mobs.effect_functions["bad_omen"] = mcl_potions.bad_omen_func mcl_mobs.effect_functions["withering"] = mcl_potions.withering_func --- give withering when standing in wither rose +-- give withering to players in a wither rose local etime = 0 minetest.register_globalstep(function(dtime) etime = dtime + etime if etime < 0.5 then return end etime = 0 for _,pl in pairs(minetest.get_connected_players()) do - local n = minetest.find_node_near(pl:get_pos(),0.4,"mcl_flowers:wither_rose",true) - if n then mcl_potions.withering_func(pl, 1, 2) end - end - for _,ent in pairs(minetest.luaentities) do - if ent.object:get_pos() and ent.is_mob then - local n = minetest.find_node_near(ent.object:get_pos(),0.4,"mcl_flowers:wither_rose",true) - if n then mcl_potions.withering_func(ent.object, 1, 2) end - end + local npos = vector.offset(pl:get_pos(), 0, 0.2, 0) + local n = minetest.get_node(npos) + if n.name == "mcl_flowers:wither_rose" then mcl_potions.withering_func(pl, 1, 2) end end end)