diff --git a/README.md b/README.md index aaa34f24..f56e131b 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,11 @@ There are so many people to list (sorry). Check out the respective mod directori * [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes * [aligator](https://github.com/aligator): Improvement of doors * [ryvnf](https://github.com/ryvnf): Explosion mechanics +<<<<<<< HEAD * MysticTempest: Bugfixes +======= +* bzoss : Brewing Stand +>>>>>>> 56a89405107fd3cd9c913a3284f8c9974aa51f62 * Lots of other people: TO BE WRITTEN (see mod directories for details) #### Mod credits (summary) diff --git a/mods/CORE/mcl_explosions/init.lua b/mods/CORE/mcl_explosions/init.lua index 2c7e69cd..47e4e89c 100644 --- a/mods/CORE/mcl_explosions/init.lua +++ b/mods/CORE/mcl_explosions/init.lua @@ -343,7 +343,11 @@ local function trace_explode(pos, strength, raydirs, radius, drop_chance, fire, minetest.bulk_set_node(airs, {name="air"}) end if #fires > 0 then +<<<<<<< HEAD minetest.bulk_set_node(fires, {name="mcl_fire:fire"}) +======= + minetest.bulk_set_node(fires, {name="mcl_core:fire"}) +>>>>>>> 56a89405107fd3cd9c913a3284f8c9974aa51f62 end -- Update falling nodes for a=1, #airs do diff --git a/mods/ITEMS/mcl_brewing/depends.txt b/mods/ITEMS/mcl_brewing/depends.txt new file mode 100755 index 00000000..73f7dce8 --- /dev/null +++ b/mods/ITEMS/mcl_brewing/depends.txt @@ -0,0 +1,7 @@ +mcl_init +mcl_formspec +mcl_sounds +mcl_potions +mcl_mobitems +mcl_core? +screwdriver? diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua new file mode 100755 index 00000000..73ddb984 --- /dev/null +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -0,0 +1,1066 @@ +local S = minetest.get_translator("mcl_brewing_stand") + +local function active_brewing_formspec(fuel_percent, brew_percent) + + return "size[9,8.75]".. + "background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory.png]".. + -- "background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory_active.png]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. + "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. + "list[current_player;main;0,7.75;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.75,9,1).. + "list[current_name;fuel;0.5,1.75;1,1;]".. + mcl_formspec.get_itemslot_bg(0.5,1.75,1,1).."image[0.5,1.75;1,1;mcl_brewing_fuel_bg.png]".. + "list[current_name;input;2.75,0.5;1,1;]".. + mcl_formspec.get_itemslot_bg(2.75,0.5,1,1).. + "list[context;stand;4.5,2.5;1,1;]".. + mcl_formspec.get_itemslot_bg(4.5,2.5,1,1).."image[4.5,2.5;1,1;mcl_brewing_bottle_bg.png]".. + "list[context;stand;6,2.8;1,1;1]".. + mcl_formspec.get_itemslot_bg(6,2.8,1,1).."image[6,2.8;1,1;mcl_brewing_bottle_bg.png]".. + "list[context;stand;7.5,2.5;1,1;2]".. + mcl_formspec.get_itemslot_bg(7.5,2.5,1,1).."image[7.5,2.5;1,1;mcl_brewing_bottle_bg.png]".. + + "image[2.7,3.33;1.28,0.41;mcl_brewing_burner.png^[lowpart:".. + (100-fuel_percent)..":mcl_brewing_burner_active.png^[transformR270]".. + + "image[2.76,1.4;1,2.15;mcl_brewing_bubbles.png^[lowpart:".. + (brew_percent)..":mcl_brewing_bubbles_active.png]".. + + "listring[current_player;main]".. + "listring[current_name;fuel]".. + "listring[current_name;input]".. + "listring[context;stand]" +end + +local brewing_formspec = "size[9,8.75]".. + "background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory.png]".. + "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. + "list[current_player;main;0,4.5;9,3;9]".. + mcl_formspec.get_itemslot_bg(0,4.5,9,3).. + "list[current_player;main;0,7.75;9,1;]".. + mcl_formspec.get_itemslot_bg(0,7.75,9,1).. + "list[current_name;fuel;0.5,1.75;1,1;]".. + mcl_formspec.get_itemslot_bg(0.5,1.75,1,1).."image[0.5,1.75;1,1;mcl_brewing_fuel_bg.png]".. + "list[current_name;input;2.75,0.5;1,1;]".. + mcl_formspec.get_itemslot_bg(2.75,0.5,1,1).. + "list[context;stand;4.5,2.5;1,1;]".. + mcl_formspec.get_itemslot_bg(4.5,2.5,1,1).."image[4.5,2.5;1,1;mcl_brewing_bottle_bg.png]".. + "list[context;stand;6,2.8;1,1;1]".. + mcl_formspec.get_itemslot_bg(6,2.8,1,1).."image[6,2.8;1,1;mcl_brewing_bottle_bg.png]".. + "list[context;stand;7.5,2.5;1,1;2]".. + mcl_formspec.get_itemslot_bg(7.5,2.5,1,1).."image[7.5,2.5;1,1;mcl_brewing_bottle_bg.png]".. + + "image[2.7,3.33;1.28,0.41;mcl_brewing_burner.png^[transformR270]".. + "image[2.76,1.4;1,2.15;mcl_brewing_bubbles.png]".. + + "listring[current_player;main]".. + "listring[current_name;fuel]".. + "listring[current_name;input]".. + "listring[context;stand]" + + +local function swap_node(pos, name) + local node = minetest.get_node(pos) + if node.name == name then + return + end + node.name = name + minetest.swap_node(pos, node) +end + + +local function brewable(inv) + + local ingredient = inv:get_stack("input",1):get_name() + local stands = {} + local stand_size = inv:get_size("stand") + local was_alchemy = {false,false,false} + + for i=1,stand_size do + + local bottle = inv:get_stack("stand", i):get_name() + + local alchemy = mcl_potions.get_alchemy(ingredient, bottle) + if alchemy then + stands[i] = alchemy + was_alchemy[i] = true + else + stands[i] = bottle + end + + end + -- if any stand holds a new potion, return the list of new potions + for i=1,table.getn(was_alchemy) do + if was_alchemy[i] then return stands end + end + + return false +end + + +local function brewing_stand_timer(pos, elapsed) + -- Inizialize metadata + local meta = minetest.get_meta(pos) + + local fuel_timer = meta:get_float("fuel_timer") or 0 + local BREW_TIME = 20 -- all brews brew the same + local BURN_TIME = BREW_TIME * 10 + + local input_item = meta:get_string("input_item") or "" + local stand_timer = meta:get_float("stand_timer") or 0 + local fuel = meta:get_float("fuel") or 0 + local inv = meta:get_inventory() + + local input_list, stand_list, fuel_list + + local update = true + + while update do + + update = false + + input_list = inv:get_list("input") + stand_list = inv:get_list("stand") + fuel_list = inv:get_list("fuel") + + -- TODO ... fix this. Goal is to reset the process if the stand changes + -- for i=1, inv:get_size("stand", i) do -- reset the process due to change + -- local _name = inv:get_stack("stand", i):get_name() + -- if _name ~= stand_items[i] then + -- stand_timer = 0 + -- stand_items[i] = _name + -- update = true -- need to update the stand with new data + -- return 1 + -- end + -- end + local brew_output = brewable(inv) + if fuel ~= 0 and brew_output then + + fuel_timer = fuel_timer + elapsed + stand_timer = stand_timer + elapsed + + if fuel_timer >= BURN_TIME then --replace with more fuel + fuel = 0 --force a new fuel grab + fuel_timer = 0 + end + + -- Replace the stand item with the brew result + if stand_timer >= BREW_TIME then + + local input_count = inv:get_stack("input",1):get_count() + if (input_count-1) ~= 0 then + inv:set_stack("input",1,inv:get_stack("input",1):get_name().." "..(input_count-1)) + else + inv:set_stack("input",1,"") + end + + for i=1, inv:get_size("stand") do + if brew_output[i] then + minetest.sound_play("mcl_brewing_complete", {pos=pos, gain=0.4, max_hear_range=16}, true) + inv:set_stack("stand", i, brew_output[i]) + minetest.sound_play("mcl_potions_bottle_pour", {pos=pos, gain=0.6, max_hear_range=16}, true) + end + end + stand_timer = 0 + update = false -- stop the update if brew is complete + end + + elseif fuel == 0 then --get more fuel from fuel_list + + -- only allow blaze powder fuel + local fuel_name = inv:get_stack("fuel",1):get_name() + local fuel_count = inv:get_stack("fuel",1):get_count() + + if fuel_name == "mcl_mobitems:blaze_powder" then -- Grab another fuel + + if (fuel_count-1) ~= 0 then + inv:set_stack("fuel",1,fuel_name.." "..(fuel_count-1)) + else + inv:set_stack("fuel",1,"") + end + update = true + fuel = 1 + else -- no fuel available + update = false + end + + end + + elapsed = 0 + end + + --update formspec + local formspec = brewing_formspec + + local result = false + + if fuel_timer ~= 0 then + local fuel_percent = math.floor(fuel_timer/BURN_TIME*100 % BURN_TIME) + local brew_percent = math.floor(stand_timer/BREW_TIME*100) + formspec = active_brewing_formspec(fuel_percent, brew_percent*1 % 100) + result = true + else + minetest.get_node_timer(pos):stop() + end + + meta:set_float("fuel_timer", fuel_timer) + meta:set_float("stand_timer", stand_timer) + meta:set_float("fuel", fuel) + -- meta:set_list("stand_items", stand_list) + meta:set_string("formspec", formspec) + + return result +end + + +local function allow_metadata_inventory_put(pos, listname, index, stack, player) + local name = player:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return 0 + end + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + if listname == "fuel" then + + -- Test stack with size 1 because we burn one fuel at a time + local teststack = ItemStack(stack) + teststack:set_count(1) + local output, decremented_input = minetest.get_craft_result({method="fuel", width=1, items={teststack}}) + if output.time ~= 0 then + -- Only allow to place 1 item if fuel get replaced by recipe. + -- This is the case for lava buckets. + local replace_item = decremented_input.items[1] + if replace_item:is_empty() then + -- For most fuels, just allow to place everything + return stack:get_count() + else + if inv:get_stack(listname, index):get_count() == 0 then + return 1 + else + return 0 + end + end + else + return 0 + end + elseif listname == "input" then + return stack:get_count() + elseif listname == "stand" then + return 0 + end +end + + +-- Drop input items of brewing_stand at pos with metadata meta +local function drop_brewing_stand_items(pos, meta) + + local inv = meta:get_inventory() + + local stack = inv:get_stack("fuel", 1) + if not stack:is_empty() then + local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + minetest.add_item(p, stack) + end + + local stack = inv:get_stack("input", 1) + if not stack:is_empty() then + local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + minetest.add_item(p, stack) + end + + for i=1, inv:get_size("stand") do + local stack = inv:get_stack("stand", i) + if not stack:is_empty() then + local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + minetest.add_item(p, stack) + end + end +end + + +local on_rotate +if minetest.get_modpath("screwdriver") then + on_rotate = screwdriver.rotate_simple +end + +local doc_string = + S("To use an brewing_stand, rightclick it. An brewing_stand has 2 input slots (on the left) and one output slot.").."\n".. + S("To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.").."\n".. + S("There are two possibilities to repair tools (and armor):").."\n".. + S("• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.").."\n".. + S("• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.").."\n".. + S("Armor counts as a tool. It is possible to repair and rename a tool in a single step.").."\n\n".. + S("The brewing_stand has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the brewing_stand gets damaged. brewing_stand also have a chance of being damaged when they fall by more than 1 block. If a very damaged brewing_stand is damaged again, it is destroyed.") +local tiles = {"mcl_brewing_top.png", --top + "mcl_brewing_base.png", --bottom + "mcl_brewing_side.png", --right + "mcl_brewing_side.png", --left + "mcl_brewing_side.png", --back + "mcl_brewing_side.png^[transformFX"} --front +local allow_put = function(pos, listname, index, stack, player) + local name = player:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return 0 + else + return stack:get_count() + end +end +local on_put = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local str = "" + for i=1, inv:get_size("stand") do + local stack = inv:get_stack("stand", i) + if not stack:is_empty() then + str = str.."1" + else str = str.."0" + end + end + minetest.swap_node(pos, {name = "mcl_brewing:stand_"..str}) + minetest.get_node_timer(pos):start(1.0) + --some code here to enforce only potions getting placed on stands +end +local after_dig = function(pos, oldnode, oldmetadata, digger) + local meta = minetest.get_meta(pos) + local meta2 = meta + meta:from_table(oldmetadata) + drop_brewing_stand_items(pos, meta) + meta:from_table(meta2:to_table()) +end +local allow_take = function(pos, listname, index, stack, player) + local name = player:get_player_name() + if minetest.is_protected(pos, name) then + minetest.record_protection_violation(pos, name) + return 0 + else + return stack:get_count() + end +end +local on_take = function(pos, listname, index, stack, player) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local str = "" + for i=1, inv:get_size("stand") do + local stack = inv:get_stack("stand", i) + if not stack:is_empty() then + str = str.."1" + else str = str.."0" + end + end + minetest.swap_node(pos, {name = "mcl_brewing:stand_"..str}) + minetest.get_node_timer(pos):start(1.0) + --some code here to enforce only potions getting placed on stands +end + +minetest.register_node("mcl_brewing:stand_000", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 0, not_in_craft_guide = 0}, + tiles = tiles, + drop = {"mcl_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + -- {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + -- {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + -- {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + -- {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + -- {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + -- {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + -- {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + -- {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + -- {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + -- {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + -- {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + -- {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_alias("mcl_brewing:stand", "mcl_brewing:stand_000") +minetest.register_node("mcl_brewing:stand_100", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + -- {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + -- {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + -- {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + -- {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + -- {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + -- {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + -- {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_node("mcl_brewing:stand_010", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + -- {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + -- {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + -- {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + -- {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + -- {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + -- {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + -- {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_node("mcl_brewing:stand_001", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + -- {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + -- {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + -- {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + -- {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + -- {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + -- {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + -- {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + -- {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + -- {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + -- {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_node("mcl_brewing:stand_110", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + -- {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + -- {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_node("mcl_brewing:stand_101", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + -- {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + -- {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + -- {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + -- {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + -- {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_node("mcl_brewing:stand_011", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + -- {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + -- {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + -- {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + -- {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + -- {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) +minetest.register_node("mcl_brewing:stand_111", { + description = S("Brewing Stand"), + _doc_items_longdesc = S("The stand allows you to brew potions!"), + _doc_items_usagehelp = doc_string, + _tt_help = S("Brew Potions"), + groups = {pickaxey=1, falling_node=1, crush_after_fall=1, deco_block=1, brewing_stand=1, not_in_creative_inventory = 1, not_in_craft_guide = 1}, + tiles = tiles, + drop = {"mlc_brewing:stand"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + + {-1/16, -5/16, -1/16, 1/16, 8/16, 1/16}, -- heat plume + { 2/16, -8/16, -8/16, 8/16, -6/16, -2/16}, -- base + {-8/16, -8/16, -8/16, -2/16, -6/16, -2/16}, -- base + {-3/16, -8/16, 2/16, 3/16, -6/16, 8/16}, -- base + + {-7/16, -6/16 ,-7/16 , -6/16, 1/16, -6/16 }, -- bottle 1 + {-6/16, -6/16 ,-6/16 , -5/16, 3/16, -5/16 }, -- bottle 1 + {-5/16, -6/16 ,-5/16 , -4/16, 3/16, -4/16 }, -- bottle 1 + {-4/16, -6/16 ,-4/16 , -3/16, 3/16, -3/16 }, -- bottle 1 + {-3/16, -6/16 ,-3/16 , -2/16, 1/16, -2/16 }, -- bottle 1 + + {-5/16, 3/16 ,-5/16 , -4/16, 7/16, -4/16 }, -- line 1 + {-4/16, 6/16 ,-4/16 , -3/16, 8/16, -3/16 }, -- line 1 + {-3/16, 7/16 ,-3/16 , -2/16, 8/16, -2/16 }, -- line 1 + {-2/16, 7/16 ,-2/16 , -1/16, 8/16, -1/16 }, -- line 1 + + + {7/16, -6/16 ,-7/16 , 6/16, 1/16, -6/16 }, -- bottle 2 + {6/16, -6/16 ,-6/16 , 5/16, 3/16, -5/16 }, -- bottle 2 + {5/16, -6/16 ,-5/16 , 4/16, 3/16, -4/16 }, -- bottle 2 + {4/16, -6/16 ,-4/16 , 3/16, 3/16, -3/16 }, -- bottle 2 + {3/16, -6/16 ,-3/16 , 2/16, 1/16, -2/16 }, -- bottle 2 + + {5/16, 3/16 ,-5/16 ,4/16, 7/16, -4/16 }, -- line 2 + {4/16, 6/16 ,-4/16 ,3/16, 8/16, -3/16 }, -- line 2 + {3/16, 7/16 ,-3/16 ,2/16, 8/16, -2/16 }, -- line 2 + {2/16, 7/16 ,-2/16 ,1/16, 8/16, -1/16 }, -- line 2 + + {0/16, -6/16 , 2/16 , 1/16, 1/16, 7/16 }, -- bottle 3 + {0/16, 1/16 , 3/16 , 1/16, 3/16, 6/16 }, -- bottle 3 + + {0/16, 7/16 , 1/16 , 1/16, 8/16, 3/16 }, -- line 3 + {0/16, 6/16 , 3/16 , 1/16, 7/16, 5/16 }, -- line 3 + {0/16, 3/16 , 4/16 , 1/16, 6/16, 5/16 }, -- line 3 + } + }, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 1200, + _mcl_hardness = 5, + + after_dig_node = after_dig, + allow_metadata_inventory_take = allow_take, + allow_metadata_inventory_put = allow_put, + on_metadata_inventory_put = on_put, + on_metadata_inventory_take = on_take, + + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input", 1) + inv:set_size("fuel", 1) + inv:set_size("stand", 3) + -- inv:set_size("stand2", 1) + -- inv:set_size("stand3", 1) + local form = brewing_formspec + meta:set_string("formspec", form) + end, + + on_receive_fields = function(pos, formname, fields, sender) + local sender_name = sender:get_player_name() + if minetest.is_protected(pos, sender_name) then + minetest.record_protection_violation(pos, sender_name) + return + end + end, + + on_timer = brewing_stand_timer, + on_rotate = on_rotate, +}) + +minetest.register_craft({ + output = "mcl_brewing:stand", + recipe = { + { "", "mcl_mobitems:blaze_rod", "" }, + { "mcl_core:stone_smooth", "mcl_core:stone_smooth", "mcl_core:stone_smooth" }, + } +}) + +-- Legacy +minetest.register_lbm({ + label = "Update brewing_stand formspecs (0.60.0", + name = "mcl_brewing:update_formspec_0_60_0", + --nodenames = { "group:brewing_stand" }, + run_at_every_load = false, + action = function(pos, node) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", brewing_formspec) + end, +}) diff --git a/mods/ITEMS/mcl_brewing/locale/template.txt b/mods/ITEMS/mcl_brewing/locale/template.txt new file mode 100755 index 00000000..56cf672a --- /dev/null +++ b/mods/ITEMS/mcl_brewing/locale/template.txt @@ -0,0 +1,3 @@ +# textdomain: mcl_brewing +Brewing Stand= +The brewing stand allows the creating of potions for the benefit of various effects. Stay tuned for developments, as you can only view the stand and interact with it, but not create potions. diff --git a/mods/ITEMS/mcl_brewing/mod.conf b/mods/ITEMS/mcl_brewing/mod.conf new file mode 100755 index 00000000..de164abf --- /dev/null +++ b/mods/ITEMS/mcl_brewing/mod.conf @@ -0,0 +1 @@ +name = mcl_brewing diff --git a/mods/ITEMS/mcl_brewing/sounds/mcl_brewing_complete.ogg b/mods/ITEMS/mcl_brewing/sounds/mcl_brewing_complete.ogg new file mode 100644 index 00000000..1798cb27 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/sounds/mcl_brewing_complete.ogg differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_base.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_base.png new file mode 100644 index 00000000..8831ffb9 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_base.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bottle_bg.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bottle_bg.png new file mode 100644 index 00000000..c0c4fd2b Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bottle_bg.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubbles.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubbles.png new file mode 100644 index 00000000..78035240 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubbles.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubbles_active.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubbles_active.png new file mode 100644 index 00000000..2a367807 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_bubbles_active.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_burner.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_burner.png new file mode 100644 index 00000000..e2e8e8af Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_burner.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_burner_active.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_burner_active.png new file mode 100644 index 00000000..93655b67 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_burner_active.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_fuel_bg.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_fuel_bg.png new file mode 100755 index 00000000..fd730958 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_fuel_bg.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_inventory.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_inventory.png new file mode 100755 index 00000000..02c9dc44 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_inventory.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_potion_bg.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_potion_bg.png new file mode 100644 index 00000000..818e41d4 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_potion_bg.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_side.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_side.png new file mode 100644 index 00000000..057a405e Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_side.png differ diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_top.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_top.png new file mode 100644 index 00000000..81e00005 Binary files /dev/null and b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_top.png differ diff --git a/mods/ITEMS/mcl_potions/depends.txt b/mods/ITEMS/mcl_potions/depends.txt index 8360d859..abcf4601 100644 --- a/mods/ITEMS/mcl_potions/depends.txt +++ b/mods/ITEMS/mcl_potions/depends.txt @@ -1,3 +1,5 @@ mcl_core mcl_farming mcl_mobitems +mcl_fishing +playerphysics diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua new file mode 100644 index 00000000..886502cf --- /dev/null +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -0,0 +1,67 @@ +local invisibility = {} + +-- reset player invisibility if they go offline +minetest.register_on_leaveplayer(function(player) + + local name = player:get_player_name() + if invisibility[name] then + invisibility[name] = nil + end + +end) + +function mcl_potions.invisible(player, toggle) + + if not player then return false end + + invisibility[player:get_player_name()] = toggle + + if toggle then -- hide player + player:set_properties({visual_size = {x = 0, y = 0}}) + player:set_nametag_attributes({color = {a = 0}}) + else -- show player + player:set_properties({visual_size = {x = 1, y = 1}}) + player:set_nametag_attributes({color = {a = 255}}) + end + +end + +function mcl_potions._use_potion(item) + item:replace("mcl_potions:glass_bottle") + minetest.sound_play("mcl_potions_drinking") +end + +function mcl_potions.healing_func(player, hp) player:set_hp(player:get_hp() + hp) end + +function mcl_potions.swiftness_func(player, factor, duration) + playerphysics.add_physics_factor(player, "speed", "swiftness", factor) + minetest.after(duration, function() playerphysics.remove_physics_factor(player, "speed", "swiftness") end ) +end + +function mcl_potions.leaping_func(player, factor, duration) + playerphysics.add_physics_factor(player, "jump", "leaping", factor) + minetest.after(duration, function() playerphysics.remove_physics_factor(player, "jump", "leaping") end ) +end + +function mcl_potions.weakness_func(player, factor, duration) + player:set_attribute("weakness", tostring(factor)) + print(player:get_player_name().." ".."weakness = "..player:get_attribute("weakness")) + minetest.after(duration, function() player:set_attribute("weakness", tostring(0)) end ) +end + +function mcl_potions.poison_func(player, factor, duration) + player:set_attribute("poison", tostring(factor)) + print(player:get_player_name().." ".."poison = "..player:get_attribute("poison")) + minetest.after(duration, function() player:set_attribute("poison", tostring(0)) end ) +end + +function mcl_potions.regeneration_func(player, factor, duration) + player:set_attribute("regeneration", tostring(factor)) + print(player:get_player_name().." ".."regeneration = "..player:get_attribute("regeneration")) + minetest.after(duration, function() player:set_attribute("regeneration", tostring(0)) end ) +end + +function mcl_potions.invisiblility_func(player, duration) + mcl_potions.invisible(player, true) + minetest.after(duration, function() mcl_potions.invisible(player, false) end ) +end diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index 5123d8b7..beb21214 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -1,4 +1,10 @@ local S = minetest.get_translator("mcl_potions") +mcl_potions = {} + +local modpath = minetest.get_modpath("mcl_potions") +dofile(modpath .. "/functions.lua") +dofile(modpath .. "/splash.lua") +dofile(modpath .. "/potions.lua") local brewhelp = S("Put this item in an item frame for decoration. It's useless otherwise.") @@ -8,7 +14,7 @@ minetest.register_craftitem("mcl_potions:fermented_spider_eye", { wield_image = "mcl_potions_spider_eye_fermented.png", inventory_image = "mcl_potions_spider_eye_fermented.png", -- TODO: Reveal item when it's actually useful - groups = { brewitem = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1 }, + groups = { brewitem = 1, not_in_creative_inventory = 0, not_in_craft_guide = 0 }, stack_max = 64, }) @@ -33,7 +39,7 @@ minetest.register_craftitem("mcl_potions:glass_bottle", { local def = minetest.registered_nodes[node.name] -- Call on_rightclick if the pointed node defines it - if placer and not placer :get_player_control().sneak then + if placer and not placer:get_player_control().sneak then if def and def.on_rightclick then return def.on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack end @@ -130,9 +136,11 @@ local potion_image = function(colorstring, opacity) if not opacity then opacity = 127 end - return "mcl_potions_potion_bottle_drinkable.png^(mcl_potions_potion_overlay.png^[colorize:"..colorstring..":"..tostring(opacity)..")" + return "mcl_potions_potion_overlay.png^[colorize:"..colorstring..":"..tostring(opacity).."^mcl_potions_potion_bottle_drinkable.png" end + + -- Cauldron fill up rules: -- Adding any water increases the water level by 1, preserving the current water type local cauldron_levels = { @@ -250,55 +258,11 @@ minetest.register_craftitem("mcl_potions:potion_river_water", { }) - -local how_to_drink = S("Use the “Place” key to drink it.") - -minetest.register_craftitem("mcl_potions:potion_awkward", { - description = S("Awkward Potion"), - _tt_help = S("No effect"), - _doc_items_longdesc = S("This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect."), - _doc_items_usagehelp = how_to_drink, - stack_max = 1, - inventory_image = potion_image("#0000FF"), - wield_image = potion_image("#0000FF"), - -- TODO: Reveal item when it's actually useful - groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1}, - on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), - on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), -}) -minetest.register_craftitem("mcl_potions:potion_mundane", { - description = S("Mundane Potion"), - _tt_help = S("No effect"), - _doc_items_longdesc = S("This potion has a clean taste and is used for brewing more potions. Drinking it has no effect."), - _doc_items_usagehelp = how_to_drink, - stack_max = 1, - inventory_image = potion_image("#0000FF"), - wield_image = potion_image("#0000FF"), - -- TODO: Reveal item when it's actually useful - groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1 }, - on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), - on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), -}) -minetest.register_craftitem("mcl_potions:potion_thick", { - description = S("Thick Potion"), - _tt_help = S("No effect"), - _doc_items_longdesc = S("This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect."), - _doc_items_usagehelp = how_to_drink, - stack_max = 1, - inventory_image = potion_image("#0000FF"), - wield_image = potion_image("#0000FF"), - -- TODO: Reveal item when it's actually useful - groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1 }, - on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), - on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), -}) - minetest.register_craftitem("mcl_potions:speckled_melon", { description = S("Glistering Melon"), _doc_items_longdesc = S("This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else."), stack_max = 64, - -- TODO: Reveal item when it's actually useful - groups = { brewitem = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1 }, + groups = { brewitem = 1, not_in_creative_inventory = 0, not_in_craft_guide = 1 }, inventory_image = "mcl_potions_melon_speckled.png", }) @@ -311,12 +275,121 @@ minetest.register_craft({ } }) -minetest.register_craftitem("mcl_potions:dragon_breath", { - description = S("Dragon's Breath"), - _doc_items_longdesc = brewhelp, - wield_image = "mcl_potions_dragon_breath.png", - inventory_image = "mcl_potions_dragon_breath.png", - -- TODO: Reveal item when it's actually useful - groups = { brewitem = 1, not_in_creative_inventory = 1 }, - stack_max = 64, -}) + +-- duration effects of redstone are a factor of 8/3 +-- duration effects of glowstone are a time factor of 1/2 and effect of 14/12 +-- splash potion effects are reduced by a factor of 3/4 + +local water_table = { + ["mcl_nether:nether_wart_item"] = "mcl_potions:awkward", + ["mcl_potions:fermented_spider_eye"] = "mcl_potions:weakness", + ["mcl_potions:speckled_melon"] = "mcl_potions:mundane", + ["mcl_core:sugar"] = "mcl_potions:mundane", + ["mcl_mobitems:magma_cream"] = "mcl_potions:mundane", + ["mcl_mobitems:blaze_powder"] = "mcl_potions:mundane", + ["mesecons:wire_00000000_off"] = "mcl_potions:mundane", + ["mcl_mobitems:ghast_tear"] = "mcl_potions:mundane", + ["mcl_mobitems:spider_eye"] = "mcl_potions:mundane", + ["mcl_mobitems:rabbit_foot"] = "mcl_potions:mundane" +} + +local awkward_table = { + ["mcl_potions:speckled_melon"] = "mcl_potions:healing", + ["mcl_farming:carrot_item_gold"] = "mcl_potions:night_vision", + ["mcl_core:sugar"] = "mcl_potions:swiftness", + ["mcl_mobitems:magma_cream"] = "mcl_potions:fire_resistance", --add craft + ["mcl_mobitems:blaze_powder"] = "mcl_potions:strength", --add craft + ["mcl_fishing:pufferfish_raw"] = "mcl_potions:water_breathing", --add craft + ["mcl_mobitems:ghast_tear"] = "mcl_potions:regeneration", --add craft + ["mcl_mobitems:spider_eye"] = "mcl_potions:poison", --add craft + ["mcl_mobitems:rabbit_foot"] = "mcl_potions:leaping", --add craft +} + +local output_table = { + ["mcl_potions:potion_river_water"] = water_table, + ["mcl_potions:potion_water"] = water_table, + ["mcl_potions:awkward"] = awkward_table, +} + + +local enhancement_table = {} +local extension_table = {} +local potions = {"awkward", "mundane", "thick"} +for i, potion in ipairs({"healing","harming","swiftness","leaping","poison","regeneration","invisibility","weakness"}) do + + table.insert(potions, potion) + + if potion ~= "invisibility" and potion ~= "night_vision" and potion ~= "weakness" then + enhancement_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_2" + enhancement_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_2_splash" + table.insert(potions, potion.."_2") + end + + if potion ~= "healing" and potion ~= "harming" then + extension_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_plus_splash" + extension_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_plus" + table.insert(potions, potion.."_plus") + end + +end + + +local inversion_table = { + ["mcl_potions:healing"] = "mcl_potions:harming", + ["mcl_potions:healing_2"] = "mcl_potions:harming_2", + ["mcl_potions:swiftness"] = "mcl_potions:slowness", + ["mcl_potions:swiftness_plus"] = "mlc_potions:slowness_plus", + ["mcl_potions:leaping"] = "mcl_potions:slowness", + ["mcl_potions:leaping_plus"] = "mcl_potions:slowness_plus", + ["mcl_potions:night_vision"] = "mcl_potions:invisibility", + ["mcl_potions:night_vision_plus"] = "mcl_potions:invisibility_plus", + ["mcl_potions:poison"] = "mcl_potions:harming", + ["mcl_potions:poison_2"] = "mcl_potions:harming_2", + ["mcl_potions:healing_splash"] = "mcl_potions:harming_splash", + ["mcl_potions:healing_2_splash"] = "mcl_potions:harming_2_splash", + ["mcl_potions:swiftness_splash"] = "mcl_potions:slowness_splash", + ["mcl_potions:swiftness_plus_splash"] = "mlc_potions:slowness_plus_splash", + ["mcl_potions:leaping_splash"] = "mcl_potions:slowness_splash", + ["mcl_potions:leaping_plus_splash"] = "mcl_potions:slowness_plus_splash", + ["mcl_potions:night_vision_splash"] = "mcl_potions:invisibility_splash", + ["mcl_potions:night_vision_plus_splash"] = "mcl_potions:invisibility_plus_splash", + ["mcl_potions:poison_splash"] = "mcl_potions:harming_splash", + ["mcl_potions:poison_2_splash"] = "mcl_potions:harming_2_splash", +} + + +local splash_table = {} +local lingering_table = {} + +for i, potion in ipairs(potions) do + splash_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_splash" + lingering_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_lingering" +end + +local mod_table = { + ["mesecons:wire_00000000_off"] = extension_table, + ["mcl_potions:fermented_spider_eye"] = inversion_table, + ["mcl_nether:glowstone_dust"] = enhancement_table, + ["mcl_mobitems:gunpowder"] = splash_table, + ["mcl_potions:dragon_breath"] = lingering_table, +} + +-- Compare two ingredients for compatable alchemy +function mcl_potions.get_alchemy(ingr, pot) + + if output_table[pot] ~= nil then + local brew_table = output_table[pot] + if brew_table[ingr] ~= nil then + return brew_table[ingr] + end + + elseif mod_table[ingr] ~= nil then + local brew_table = mod_table[ingr] + if brew_table[pot] ~= nil then + return brew_table[pot] + end + + end + + return false +end diff --git a/mods/ITEMS/mcl_potions/potions.lua b/mods/ITEMS/mcl_potions/potions.lua new file mode 100644 index 00000000..32ddb378 --- /dev/null +++ b/mods/ITEMS/mcl_potions/potions.lua @@ -0,0 +1,549 @@ +local S = minetest.get_translator("mcl_potions") + +local potion_image = function(colorstring, opacity) + if not opacity then + opacity = 127 + end + return "mcl_potions_potion_overlay.png^[colorize:"..colorstring..":"..tostring(opacity).."^mcl_potions_potion_bottle_drinkable.png" +end + +local how_to_drink = S("Use the “Place” key to drink it.") + +minetest.register_craftitem("mcl_potions:awkward", { + description = S("Awkward Potion"), + _tt_help = S("No effect"), + _doc_items_longdesc = S("This potion has an awkward taste and is used for brewing more potions. Drinking it has no effect."), + _doc_items_usagehelp = how_to_drink, + stack_max = 1, + inventory_image = potion_image("#0000FF"), + wield_image = potion_image("#0000FF"), + -- TODO: Reveal item when it's actually useful + groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1}, + on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), + on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), +}) +minetest.register_craftitem("mcl_potions:mundane", { + description = S("Mundane Potion"), + _tt_help = S("No effect"), + _doc_items_longdesc = S("This potion has a clean taste and is used for brewing more potions. Drinking it has no effect."), + _doc_items_usagehelp = how_to_drink, + stack_max = 1, + inventory_image = potion_image("#0000FF"), + wield_image = potion_image("#0000FF"), + -- TODO: Reveal item when it's actually useful + groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1 }, + on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), + on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), +}) + + +minetest.register_craftitem("mcl_potions:thick", { + description = S("Thick Potion"), + _tt_help = S("No effect"), + _doc_items_longdesc = S("This potion has a bitter taste and is used for brewing more potions. Drinking it has no effect."), + _doc_items_usagehelp = how_to_drink, + stack_max = 1, + inventory_image = potion_image("#0000FF"), + wield_image = potion_image("#0000FF"), + -- TODO: Reveal item when it's actually useful + groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, + on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), + on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), +}) + + +minetest.register_craftitem("mcl_potions:dragon_breath", { + description = S("Dragon's Breath"), + _doc_items_longdesc = brewhelp, + wield_image = "mcl_potions_dragon_breath.png", + inventory_image = "mcl_potions_dragon_breath.png", + groups = { brewitem = 1, not_in_creative_inventory = 0 }, + stack_max = 1, +}) + + +minetest.register_craftitem("mcl_potions:healing", { + description = S("Healing Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#CC0000"), + inventory_image = potion_image("#CC0000"), + groups = { brewitem = 1, food=3, can_eat_when_full=1 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, 4) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, 4) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:healing_2", { + description = S("Healing Potion II"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#DD0000"), + inventory_image = potion_image("#DD0000"), + groups = { brewitem = 1, food=3, can_eat_when_full=1 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, 8) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, 8) + mcl_potions._use_potion(itemstack) + return itemstack + end, + +}) + +minetest.register_craftitem("mcl_potions:harming", { + description = S("Harming Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#660099"), + inventory_image = potion_image("#660099"), + groups = { brewitem = 1, food=3, can_eat_when_full=1 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, -6) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, -6) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:harming_2", { + description = S("Harming Potion II"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#330066"), + inventory_image = potion_image("#330066"), + groups = { brewitem = 1, food=3, can_eat_when_full=1 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, -12) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.healing_func(user, -12) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + + +minetest.register_craftitem("mcl_potions:night_vision", { + description = S("Night Vision Potion"), + _doc_items_longdesc = brewhelp, + wield_image = "mcl_potions_night_vision.png", + inventory_image = "mcl_potions_night_vision.png", + groups = { brewitem = 1, food=0}, + stack_max = 1, +}) + + +minetest.register_craftitem("mcl_potions:swiftness", { + description = S("Swiftness Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#009999"), + inventory_image = potion_image("#009999"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 1.2, 180) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 1.2, 180) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:swiftness_2", { + description = S("Swiftness Potion II"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#00BBBB"), + inventory_image = potion_image("#00BBBB"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 1.4, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 1.4, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:swiftness_plus", { + description = S("Swiftness Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#00AAAA"), + inventory_image = potion_image("#00AAAA"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 1.2, 480) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 1.2, 480) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:slowness", { + description = S("Slowness Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#000080"), + inventory_image = potion_image("#000080"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 0.85, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 0.85, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:slowness_plus", { + description = S("Slowness Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#000066"), + inventory_image = potion_image("#000066"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 0.85, 240) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.swiftness_func(user, 0.85, 240) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + + +minetest.register_craftitem("mcl_potions:leaping", { + description = S("Leaping Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#00CC33"), + inventory_image = potion_image("#00CC33"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.leaping_func(user, 1.2, 180) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.leaping_func(user, 1.2, 180) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:leaping_2", { + description = S("Leaping Potion II"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#00EE33"), + inventory_image = potion_image("#00EE33"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.leaping_func(user, 1.4, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.leaping_func(user, 1.4, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + +minetest.register_craftitem("mcl_potions:leaping_plus", { + description = S("Leaping Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#00DD33"), + inventory_image = potion_image("#00DD33"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.leaping_func(user, 1.2, 480) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.leaping_func(user, 1.2, 480) + mcl_potions._use_potion(itemstack) + return itemstack + end, +}) + + +minetest.register_craftitem("mcl_potions:weakness", { + description = S("Weakness Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#6600AA"), + inventory_image = potion_image("#6600AA"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.weakness_func(user, 1.2, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.weakness_func(user, 1.2, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +minetest.register_craftitem("mcl_potions:weakness_plus", { + description = S("Weakness Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#7700BB"), + inventory_image = potion_image("#7700BB"), + groups = { brewitem = 1, food=0}, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.weakness_func(user, 1.4, 240) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.weakness_func(user, 1.4, 240) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + + +minetest.register_craftitem("mcl_potions:poison", { + description = S("Poison Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#225533"), + inventory_image = potion_image("#225533"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.poison_func(user, 2.5, 45) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.poison_func(user, 2.5, 45) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +minetest.register_craftitem("mcl_potions:poison_2", { + description = S("Poison Potion II"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#447755"), + inventory_image = potion_image("#447755"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.poison_func(user, 1.2, 21) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.poison_func(user, 1.2, 21) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +minetest.register_craftitem("mcl_potions:poison_plus", { + description = S("Poison Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#336644"), + inventory_image = potion_image("#336644"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.poison_func(user, 2.5, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.poison_func(user, 2.5, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + + +minetest.register_craftitem("mcl_potions:regeneration", { + description = S("Regeneration Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#A52BB2"), + inventory_image = potion_image("#A52BB2"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.regeneration_func(user, 2.5, 45) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.regeneration_func(user, 2.5, 45) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +minetest.register_craftitem("mcl_potions:regeneration_2", { + description = S("Regeneration Potion II"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#B52CC2"), + inventory_image = potion_image("#B52CC2"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.regeneration_func(user, 1.2, 21) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.regeneration_func(user, 1.2, 21) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +minetest.register_craftitem("mcl_potions:regeneration_plus", { + description = S("Regeneration Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#C53DD3"), + inventory_image = potion_image("#C53DD3"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.regeneration_func(user, 2.5, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.regeneration_func(user, 2.5, 90) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + + +minetest.register_craftitem("mcl_potions:invisibility", { + description = S("Invisibility Potion"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#B0B0B0"), + inventory_image = potion_image("#B0B0B0"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.invisiblility_func(user, 180) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.invisiblility_func(user, 180) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +minetest.register_craftitem("mcl_potions:invisibility_plus", { + description = S("Invisibility Potion +"), + _doc_items_longdesc = brewhelp, + wield_image = potion_image("#A0A0A0"), + inventory_image = potion_image("#A0A0A0"), + groups = { brewitem = 1, food = 0 }, + stack_max = 1, + + on_place = function(itemstack, user, pointed_thing) + mcl_potions.invisiblility_func(user, 480) + mcl_potions._use_potion(itemstack) + return itemstack + end, + + on_secondary_use = function(itemstack, user, pointed_thing) + mcl_potions.invisiblility_func(user, 480) + mcl_potions._use_potion(itemstack) + return itemstack + end +}) + +-- Look into reducing attack on punch +minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) + if puncher:get_attribute("weakness") then + print("Weakness Active") + end +end) diff --git a/mods/ITEMS/mcl_potions/sounds/mcl_potions_breaking_glass.ogg b/mods/ITEMS/mcl_potions/sounds/mcl_potions_breaking_glass.ogg new file mode 100755 index 00000000..4cb7b5a0 Binary files /dev/null and b/mods/ITEMS/mcl_potions/sounds/mcl_potions_breaking_glass.ogg differ diff --git a/mods/ITEMS/mcl_potions/sounds/mcl_potions_drinking.ogg b/mods/ITEMS/mcl_potions/sounds/mcl_potions_drinking.ogg new file mode 100644 index 00000000..6e3978d2 Binary files /dev/null and b/mods/ITEMS/mcl_potions/sounds/mcl_potions_drinking.ogg differ diff --git a/mods/ITEMS/mcl_potions/splash.lua b/mods/ITEMS/mcl_potions/splash.lua new file mode 100644 index 00000000..8cc62099 --- /dev/null +++ b/mods/ITEMS/mcl_potions/splash.lua @@ -0,0 +1,175 @@ +local splash_image = function(colorstring, opacity) + if not opacity then + opacity = 127 + end + return "mcl_potions_splash_overlay.png^[colorize:"..colorstring..":"..tostring(opacity).."^mcl_potions_splash_bottle.png" +end + +local function register_splash(name, descr, color, def) + + local id = "mcl_potions:"..name.."_splash" + minetest.register_craftitem(id, { + description = descr, + inventory_image = splash_image(color), + on_use = function(item, placer, pointed_thing) + --weapons_shot(itemstack, placer, pointed_thing, def.velocity, name) + local velocity = 10 + local dir = placer:get_look_dir(); + local pos = placer:getpos(); + local obj = minetest.env:add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying") + obj:setvelocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity}) + obj:setacceleration({x=0, y=-9.8, z=0}) + item:take_item() + return item + end, + stack_max = 1, + }) + + local w = 0.7 + + minetest.register_entity(id.."_flying",{ + textures = {splash_image(color)}, + hp_max = 1, + visual_size = {x=w/2,y=w/2}, + collisionbox = {0,0,0,0,0,0}, + on_step = function(self, dtime) + local pos = self.object:getpos() + local node = minetest.get_node(pos) + local n = node.name + local d = 2 + local redux_map = {7/8,0.5,0.25} + if n ~= "air" then + minetest.sound_play("mcl_potions_breaking_glass") + minetest.add_particlespawner({ + amount = 40, + time = 2, + minpos = {x=pos.x-d, y=pos.y, z=pos.z-d}, + maxpos = {x=pos.x+d, y=pos.y+1, z=pos.z+d}, + minvel = {x=-1, y=0, z=-1}, + maxvel = {x=1, y=0.5, z=1}, + minacc = {x=-0.5, y=0, z=-0.5}, + maxacc = {x=0.5, y=.2, z=0.5}, + minexptime = 1, + maxexptime = 5, + minsize = 2, + maxsize = 4, + collisiondetection = false, + vertical = false, + texture = "mcl_potions_sprite.png^[colorize:"..color..":127", + }) + self.object:remove() + for i, obj in ipairs(minetest.get_objects_inside_radius(pos, 4)) do + + if minetest.is_player(obj) then + + pos2 = obj:get_pos() + local rad = math.floor(math.sqrt((pos2.x-pos.x)^2 + (pos2.y-pos.y)^2 + (pos2.z-pos.z)^2)) + if rad > 0 then def.potion_fun(obj, redux_map[rad]) else def.potion_fun(obj, 1) end + + end + end + + end + end, + }) +end + +register_splash("awkward", "Splash Awkward Potion", "#0000FF", { + potion_fun = function(player, redx) end, +}) + +register_splash("mundane", "Splash Mundane Potion", "#0000FF", { + potion_fun = function(player, redx) end, +}) + +register_splash("thick", "Splash Thick Potion", "#0000FF", { + potion_fun = function(player, redx) end, +}) + +register_splash("healing", "Splash Healing", "#AA0000", { + potion_fun = function(player, redx) player:set_hp(player:get_hp() + 3*redx) end, +}) + +register_splash("healing_2", "Splash Healing II", "#DD0000", { + potion_fun = function(player, redx) player:set_hp(player:get_hp() + 6*redx) end, +}) + +register_splash("harming", "Splash Harming", "#660099", { + potion_fun = function(player, redx) mcl_potions.healing_func(player, -4*redx) end, +}) + +register_splash("harming_2", "Splash Harming II", "#330066", { + potion_fun = function(player, redx) mcl_potions.healing_func(player, -6*redx) end, +}) + +register_splash("leaping", "Splash Leaping", "#00CC33", { + potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.2, 135*redx) end +}) + +register_splash("leaping_2", "Splash Leaping II", "#00EE33", { + potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.4, 135*redx) end +}) + +register_splash("leaping_plus", "Splash Leaping +", "#00DD33", { + potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.2, 360*redx) end +}) + +register_splash("swiftness", "Splash Swiftness", "#009999", { + potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.2, 135*redx) end +}) + +register_splash("swiftness_2", "Splash Swiftness II", "#00BBBB", { + potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.4, 135*redx) end +}) + +register_splash("swiftness_plus", "Splash Swiftness +", "#00BBBB", { + potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.2, 360*redx) end +}) + +register_splash("slowness", "Splash Slowness ", "#000080", { + potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 68*redx) end +}) + +register_splash("slowness_plus", "Splash Slowness +", "#000066", { + potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 180*redx) end +}) + +register_splash("poison", "Splash Poison", "#335544", { + potion_fun = function(player, redx) mcl_potions.poison_func(player, 0.85, 180*redx) end +}) + +register_splash("poison_2", "Splash Poison II", "#446655", { + potion_fun = function(player, redx) mcl_potions.poison_func(player, 0.85, 180*redx) end +}) + +register_splash("poison_plus", "Splash Poison +", "#557766", { + potion_fun = function(player, redx) mcl_potions.poison_func(player, 0.85, 180*redx) end +}) + +register_splash("regeneration", "Splash Regeneration", "#A52BB2", { + potion_fun = function(player, redx) mcl_potions.regeneration_func(player, 0.85, 180*redx) end +}) + +register_splash("regeneration_2", "Splash Regeneration II", "#B52CC2", { + potion_fun = function(player, redx) mcl_potions.regeneration_func(player, 0.85, 180*redx) end +}) + +register_splash("regeneration_plus", "Splash Regeneration +", "#C53DD3", { + potion_fun = function(player, redx) mcl_potions.regeneration_func(player, 0.85, 300*redx) end +}) + +register_splash("invisibility", "Splash Invisibility", "#B0B0B0", { + potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, 135*redx) end +}) + +register_splash("invisibility_plus", "Splash Invisibility +", "#A0A0A0", { + potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, 300*redx) end +}) + +register_splash("weakness", "Splash Weakness", "#6600AA", { + potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.2, 68*redx) end +}) + +register_splash("weakness_plus", "Splash Weakness +", "#7700BB", { + potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.4, 180*redx) end +}) diff --git a/mods/ITEMS/mcl_potions/textures/hb_potion_bar.png b/mods/ITEMS/mcl_potions/textures/hb_potion_bar.png new file mode 100644 index 00000000..ce0aa78e Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/hb_potion_bar.png differ diff --git a/mods/ITEMS/mcl_potions/textures/hb_swiftness_bgicon.png b/mods/ITEMS/mcl_potions/textures/hb_swiftness_bgicon.png new file mode 100644 index 00000000..b01f1485 Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/hb_swiftness_bgicon.png differ diff --git a/mods/ITEMS/mcl_potions/textures/hb_swiftness_icon.png b/mods/ITEMS/mcl_potions/textures/hb_swiftness_icon.png new file mode 100644 index 00000000..5c85ae17 Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/hb_swiftness_icon.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_healing.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_healing.png new file mode 100644 index 00000000..66bdbe00 Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_healing.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_night_vision.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_night_vision.png new file mode 100644 index 00000000..9a4ee688 Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_night_vision.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_splash_bottle.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_splash_bottle.png new file mode 100644 index 00000000..17a69a8b Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_splash_bottle.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_splash_overlay.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_splash_overlay.png new file mode 100644 index 00000000..9acbce6c Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_splash_overlay.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_sprite.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_sprite.png new file mode 100644 index 00000000..17391b1f Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_sprite.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_swiftness.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_swiftness.png new file mode 100644 index 00000000..4dbf788a Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_swiftness.png differ diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_weakness.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_weakness.png new file mode 100644 index 00000000..524ebeea Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_weakness.png differ