forked from LizzyFleckenstein03/Memeclone
Remove potion effects by drinking milk.
This commit is contained in:
parent
44ee9cde86
commit
1d471c52df
|
@ -374,7 +374,7 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, inv_siz
|
||||||
tools = "mcl_core:axe_iron",
|
tools = "mcl_core:axe_iron",
|
||||||
combat = "mcl_core:sword_gold",
|
combat = "mcl_core:sword_gold",
|
||||||
mobs = "mobs_mc:cow",
|
mobs = "mobs_mc:cow",
|
||||||
brew = "mcl_potions:water",
|
brew = "mcl_potions:dragon_breath",
|
||||||
matr = "mcl_core:stick",
|
matr = "mcl_core:stick",
|
||||||
inv = "mcl_chests:chest",
|
inv = "mcl_chests:chest",
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,6 +142,7 @@ local drink_milk = function(itemstack, player, pointed_thing)
|
||||||
if mcl_hunger.active and (bucket:get_name() ~= "mcl_mobitems:milk_bucket" or minetest.settings:get_bool("creative_mode") == true) then
|
if mcl_hunger.active and (bucket:get_name() ~= "mcl_mobitems:milk_bucket" or minetest.settings:get_bool("creative_mode") == true) then
|
||||||
mcl_hunger.stop_poison(player)
|
mcl_hunger.stop_poison(player)
|
||||||
end
|
end
|
||||||
|
mcl_potions._reset_player_effects(player)
|
||||||
return bucket
|
return bucket
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -439,4 +440,3 @@ minetest.register_craft({
|
||||||
{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",},
|
{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",},
|
||||||
{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}},
|
{"mcl_mobitems:slimeball","mcl_mobitems:slimeball","mcl_mobitems:slimeball",}},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function _reset_player_effects(player)
|
function mcl_potions._reset_player_effects(player)
|
||||||
|
|
||||||
player = player or player:get_luaentity()
|
player = player or player:get_luaentity()
|
||||||
|
|
||||||
|
@ -231,9 +231,8 @@ local function _reset_player_effects(player)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_leaveplayer( function(player) _reset_player_effects(player) end)
|
minetest.register_on_leaveplayer( function(player) mcl_potions._reset_player_effects(player) end)
|
||||||
|
minetest.register_on_dieplayer( function(player) mcl_potions._reset_player_effects(player) end)
|
||||||
minetest.register_on_dieplayer( function(player) _reset_player_effects(player) end)
|
|
||||||
|
|
||||||
function mcl_potions.is_obj_hit(self, pos)
|
function mcl_potions.is_obj_hit(self, pos)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue