123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- minetest.register_node("lottpotion:cauldron_full",{
- drawtype="nodebox",
- description= "Filled Cauldron",
- tiles = {"lottpotion_cauldron_top.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png",
- "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {cracky=1},
- legacy_facedir_simple = true,
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375},
- {0.375, -0.5, -0.5, 0.5, 0.5, -0.375},
- {0.375, -0.5, 0.375, 0.5, 0.5, 0.5},
- {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5},
- {-0.375, -0.375, -0.375, 0.375, -0.3125, 0.375},
- {-0.5, -0.375, -0.375, -0.375, 0.4375, 0.375},
- {0.375, -0.375, -0.375, 0.5, 0.4375, 0.375},
- {-0.375, -0.375, 0.375, 0.375, 0.4375, 0.5},
- {-0.375, -0.375, -0.5, 0.375, 0.4375, -0.375},
- {-0.375, 0.25, -0.375, 0.375, 0.3125, 0.375},
- }
- },
- on_punch = function(pos, node, player)
- local player_inv = player:get_inventory()
- local itemstack = player:get_wielded_item()
- if itemstack:get_name() == "vessels:glass_bottle" then
- minetest.set_node(pos, {name="lottpotion:cauldron_two_third_full"})
- if player_inv:room_for_item("main", 1) then
- itemstack:take_item(1)
- player_inv:add_item("main", "lottpotion:glass_bottle_water")
- end
- player:set_wielded_item(itemstack)
- end
- end,
- })
- minetest.register_node("lottpotion:cauldron_two_third_full",{
- drawtype="nodebox",
- description= "Two Third Filled Cauldron",
- tiles = {"lottpotion_cauldron_top.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png",
- "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {cracky=1, not_in_creative_inventory=1},
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375},
- {0.375, -0.5, -0.5, 0.5, 0.5, -0.375},
- {0.375, -0.5, 0.375, 0.5, 0.5, 0.5},
- {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5},
- {-0.375, -0.375, -0.375, 0.375, -0.3125, 0.375},
- {-0.5, -0.375, -0.375, -0.375, 0.4375, 0.375},
- {0.375, -0.375, -0.375, 0.5, 0.4375, 0.375},
- {-0.375, -0.375, 0.375, 0.375, 0.4375, 0.5},
- {-0.375, -0.375, -0.5, 0.375, 0.4375, -0.375},
- {-0.375, 0.0625, -0.375, 0.375, 0.125, 0.375},
- }
- },
- on_punch = function(pos, node, player)
- local player_inv = player:get_inventory()
- local itemstack = player:get_wielded_item()
- if itemstack:get_name() == "vessels:glass_bottle" then
- minetest.set_node(pos, {name="lottpotion:cauldron_one_third_full"})
- if player_inv:room_for_item("main", 1) then
- itemstack:take_item(1)
- player_inv:add_item("main", "lottpotion:glass_bottle_water")
- end
- player:set_wielded_item(itemstack)
- end
- end,
- })
- minetest.register_node("lottpotion:cauldron_one_third_full",{
- drawtype="nodebox",
- description= "One Third Filled Cauldron",
- tiles = {"lottpotion_cauldron_top.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png",
- "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png", "lottpotion_cauldron_side.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {cracky=1, not_in_creative_inventory=1},
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375},
- {0.375, -0.5, -0.5, 0.5, 0.5, -0.375},
- {0.375, -0.5, 0.375, 0.5, 0.5, 0.5},
- {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5},
- {-0.375, -0.375, -0.375, 0.375, -0.3125, 0.375},
- {-0.5, -0.375, -0.375, -0.375, 0.4375, 0.375},
- {0.375, -0.375, -0.375, 0.5, 0.4375, 0.375},
- {-0.375, -0.375, 0.375, 0.375, 0.4375, 0.5},
- {-0.375, -0.375, -0.5, 0.375, 0.4375, -0.375},
- {-0.375, -0.125, -0.375, 0.375, -0.0625, 0.375},
- }
- },
- on_punch = function(pos, node, player)
- local player_inv = player:get_inventory()
- local itemstack = player:get_wielded_item()
- if itemstack:get_name() == "vessels:glass_bottle" then
- minetest.set_node(pos, {name="lottpotion:cauldron_empty"})
- if player_inv:room_for_item("main", 1) then
- itemstack:take_item(1)
- player_inv:add_item("main", "lottpotion:glass_bottle_water")
- end
- player:set_wielded_item(itemstack)
- end
- end,
- })
- minetest.register_node("lottpotion:cauldron_empty",{
- drawtype="nodebox",
- description= "Cauldron",
- tiles = {"lottpotion_cauldron_side.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- groups = {cracky=1,level=2},
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375},
- {0.375, -0.5, -0.5, 0.5, 0.5, -0.375},
- {0.375, -0.5, 0.375, 0.5, 0.5, 0.5},
- {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5},
- {-0.375, -0.375, -0.375, 0.375, -0.3125, 0.375},
- {-0.5, -0.375, -0.375, -0.375, 0.4375, 0.375},
- {0.375, -0.375, -0.375, 0.5, 0.4375, 0.375},
- {-0.375, -0.375, 0.375, 0.375, 0.4375, 0.5},
- {-0.375, -0.375, -0.5, 0.375, 0.4375, -0.375},
- {-0.375, -0.125, -0.375, 0.375, -0.25, 0.375},
- },
- },
- on_rightclick = function(pos, node, clicker, itemstack)
- if itemstack:get_name() == "bucket:bucket_water" then
- minetest.set_node(pos, {name="lottpotion:cauldron_full"})
- return {name="bucket:bucket_empty"}
- end
- end
- })
- minetest.register_node("lottpotion:glass_bottle_water", {
- description = "Glass Bottle (Water)",
- drawtype = "plantlike",
- tiles = {"vessels_glass_bottle.png^lottpotion_water.png"},
- inventory_image = "vessels_glass_bottle_inv.png^lottpotion_water.png",
- wield_image = "vessels_glass_bottle_inv.png^lottpotion_water.png",
- paramtype = "light",
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
- },
- groups = {vessel=1,dig_immediate=3,attached_node=1},
- sounds = default.node_sound_glass_defaults(),
- })
- minetest.register_node(":vessels:drinking_glass", {
- description = "Drinking Glass (empty)",
- drawtype = "plantlike",
- tiles = {"vessels_drinking_glass.png"},
- inventory_image = "vessels_drinking_glass_inv.png",
- wield_image = "vessels_drinking_glass.png",
- paramtype = "light",
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
- },
- groups = {vessel=1,dig_immediate=3,attached_node=1},
- sounds = default.node_sound_glass_defaults(),
- on_use = function(itemstack, user, pointed_thing)
- pos = pointed_thing.above
- if pos == nil then return itemstack end
- pos.y = pos.y - 1
- if (minetest.get_node(pos).name == "lottpotion:cauldron_full") then
- minetest.remove_node(pos)
- minetest.set_node(pos, {name="lottpotion:cauldron_two_third_full"})
- itemstack:take_item()
- user:get_inventory():add_item('main', "lottpotion:drinking_glass_water")
- return itemstack
- end
- if (minetest.get_node(pos).name == "lottpotion:cauldron_two_third_full") then
- minetest.remove_node(pos)
- minetest.set_node(pos, {name="lottpotion:cauldron_one_third_full"})
- itemstack:take_item()
- user:get_inventory():add_item('main', "lottpotion:drinking_glass_water")
- return itemstack
- end
- if (minetest.get_node(pos).name == "lottpotion:cauldron_one_third_full") then
- minetest.remove_node(pos)
- minetest.set_node(pos, {name="lottpotion:cauldron_empty"})
- itemstack:take_item()
- user:get_inventory():add_item('main', "lottpotion:drinking_glass_water")
- return itemstack
- end
- end
- })
- minetest.register_node("lottpotion:drinking_glass_water", {
- description = "Drinking Glass (Water)",
- drawtype = "plantlike",
- tiles = {"lottpotion_glass_water.png"},
- inventory_image = "lottpotion_glass_water.png",
- wield_image = "lottpotion_glass_water.png",
- paramtype = "light",
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
- },
- groups = {vessel=1,dig_immediate=3,attached_node=1},
- sounds = default.node_sound_glass_defaults(),
- })
- minetest.register_craft( {
- type = "shapeless",
- output = "vessels:glass_fragments",
- recipe = {
- "group:vessel",
- "group:vessel",
- },
- })
- minetest.register_craft({
- output = 'lottpotion:cauldron_empty',
- recipe = {
- {'default:steel_ingot', '', 'default:steel_ingot'},
- {'default:steel_ingot', '', 'default:steel_ingot'},
- {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
- }
- })
|