1
0
Fork 0

remove redundant code and add lingering potions -TODO: Add lingering effect

This commit is contained in:
Brandon 2020-06-17 17:05:44 -04:00
parent 021492994a
commit b8256cd447
1 changed files with 3 additions and 6 deletions

View File

@ -874,9 +874,11 @@ local inversion_table = {
local splash_table = {} local splash_table = {}
local lingering_table = {}
for i, potion in ipairs(potions) do for i, potion in ipairs(potions) do
splash_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_splash" splash_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_splash"
lingering_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_lingering"
end end
local mod_table = { local mod_table = {
@ -884,6 +886,7 @@ local mod_table = {
["mcl_potions:fermented_spider_eye"] = inversion_table, ["mcl_potions:fermented_spider_eye"] = inversion_table,
["mcl_nether:glowstone_dust"] = enhancement_table, ["mcl_nether:glowstone_dust"] = enhancement_table,
["mcl_mobitems:gunpowder"] = splash_table, ["mcl_mobitems:gunpowder"] = splash_table,
["mcl_potions:dragon_breath"] = lingering_table,
} }
-- Compare two ingredients for compatable alchemy -- Compare two ingredients for compatable alchemy
@ -901,12 +904,6 @@ function mcl_potions.get_alchemy(ingr, pot)
return brew_table[pot] return brew_table[pot]
end end
elseif splash_table[ingr] ~= nil then
local brew_table = mod_table[ingr]
if brew_table[pot] ~= nil then
return brew_table[pot]
end
end end
return false return false