commit 1da906940dfabd695cacdea06eb8acc4f5fee883 Author: adrido Date: Sat Oct 12 11:52:57 2013 +0200 init diff --git a/crafts.lua b/crafts.lua new file mode 100644 index 0000000..a62129c --- /dev/null +++ b/crafts.lua @@ -0,0 +1,269 @@ +minetest.register_craft({ + output = '"christmas_craft:snowman" 1', + recipe = { + {"default:coal_lump","christmas_craft:snowball","default:coal_lump"}, + {"christmas_craft:snowball","christmas_craft:snowball","christmas_craft:snowball"}, + {"default:coal_lump","default:coal_lump","default:coal_lump"}, + } +}) +------ +minetest.register_craft({ + output = '"christmas_craft:snow_block" 1', + recipe = { + {"christmas_craft:snowball","christmas_craft:snowball"}, + {"christmas_craft:snowball","christmas_craft:snowball"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_blue" 1', + recipe = { + {"christmas_craft:mithril_nugget"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_red" 1', + recipe = { + {"christmas_craft:iron_nugget"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_yellow" 1', + recipe = { + {"christmas_craft:gold_nugget"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_green" 1', + recipe = { + {"christmas_craft:cactus_bit"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_leaves" 4', + recipe = { + {"default:leaves"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:iron_nugget" 9', + recipe = { + {"default:iron_lump"}, + } +}) + + +minetest.register_craft({ + output = '"christmas_craft:gold_nugget" 9', + recipe = { + {"moreores:gold_lump"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:mithril_nugget" 9', + recipe = { + {"moreores:mithril_lump"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:cactus_bit" 9', + recipe = { + {"default:cactus"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:tin_nugget" 9', + recipe = { + {"moreores:tin_lump"}, + } +}) + +minetest.register_craft({ + output = '"default:iron_lump" 1', + recipe = { + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget", "christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget", "christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget", "christmas_craft:iron_nugget"}, + } +}) + +minetest.register_craft({ + output = '"moreores:gold_lump" 1', + recipe = { + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget", "christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget", "christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget", "christmas_craft:gold_nugget"}, + } +}) + +minetest.register_craft({ + output = '"moreores:mithril_lump" 1', + recipe = { + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget"}, + } +}) + +minetest.register_craft({ + output = '"default:cactus" 1', + recipe = { + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit", "christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit", "christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit", "christmas_craft:cactus_bit"}, + } +}) + +minetest.register_craft({ + output = '"moreores:tin_lump" 1', + recipe = { + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget", "christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget", "christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget", "christmas_craft:tin_nugget"}, + } +}) + + +minetest.register_craft({ + output = '"christmas_craft:red_baubles" 1', + recipe = { + {"christmas_craft:iron_nugget", "default:stick","christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "default:glass","christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget","christmas_craft:iron_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:yellow_baubles" 1', + recipe = { + {"christmas_craft:gold_nugget", "default:stick","christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "default:glass","christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget","christmas_craft:gold_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:blue_baubles" 1', + recipe = { + {"christmas_craft:mithril_nugget", "default:stick","christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "default:glass","christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget","christmas_craft:mithril_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:green_baubles" 1', + recipe = { + {"christmas_craft:cactus_bit", "default:stick","christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "default:glass","christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit","christmas_craft:cactus_bit"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:silver_baubles" 1', + recipe = { + {"christmas_craft:tin_nugget", "default:stick","christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "default:glass","christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget","christmas_craft:tin_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present" 1', + recipe = { + {"default:paper", "default:paper","default:paper"}, + {"default:paper", "default:mese","default:paper"}, + {"default:paper", "default:paper","default:paper"}, + } +}) + +-- paper -- + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_green" 1', + recipe = { + {"christmas_craft:paper_green", "christmas_craft:paper_green","christmas_craft:paper_green"}, + {"christmas_craft:paper_green", "default:mese","christmas_craft:paper_green"}, + {"christmas_craft:paper_green", "christmas_craft:paper_green","christmas_craft:paper_green"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_yellow" 1', + recipe = { + {"christmas_craft:paper_yellow", "christmas_craft:paper_yellow","christmas_craft:paper_yellow"}, + {"christmas_craft:paper_yellow", "default:mese","christmas_craft:paper_yellow"}, + {"christmas_craft:paper_yellow", "christmas_craft:paper_yellow","christmas_craft:paper_yellow"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_red" 1', + recipe = { + {"christmas_craft:paper_red", "christmas_craft:paper_red","christmas_craft:paper_red"}, + {"christmas_craft:paper_red", "default:mese","christmas_craft:paper_red"}, + {"christmas_craft:paper_red", "christmas_craft:paper_red","christmas_craft:paper_red"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_blue" 1', + recipe = { + {"christmas_craft:paper_blue", "christmas_craft:paper_blue","christmas_craft:paper_blue"}, + {"christmas_craft:paper_blue", "default:mese","christmas_craft:paper_blue"}, + {"christmas_craft:paper_blue", "christmas_craft:paper_blue","christmas_craft:paper_blue"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_wreath" 1', + recipe = { + {"", "christmas_craft:christmas_leaves",""}, + {"christmas_craft:christmas_leaves", "","christmas_craft:christmas_leaves"}, + {"", "christmas_craft:christmas_leaves",""}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_star" 1', + recipe = { + {"", "moreores:gold_ingot",""}, + {"moreores:gold_ingot", "moreores:gold_ingot","moreores:gold_ingot"}, + {"", "moreores:gold_ingot",""}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_lights" 18', + recipe = { + {"default:mese","default:mese"}, + {"default:glass","default:glass"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:snowball" 4', + recipe = { + {"christmas_craft:snow_block"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:snow" 3', + recipe = { + {"christmas_craft:snowball","christmas_craft:snowball","christmas_craft:snowball"}, + } +}) diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..331d858 --- /dev/null +++ b/depends.txt @@ -0,0 +1 @@ +default \ No newline at end of file diff --git a/init - Copy.lua b/init - Copy.lua new file mode 100644 index 0000000..991faed --- /dev/null +++ b/init - Copy.lua @@ -0,0 +1,814 @@ + +-- blocks -- + +minetest.register_node("christmas_craft:snowman", { + description = "Snowman", + tiles = {"snow.png", "snow.png", "snow.png", + "snow.png", "snow.png", "Snowman_F.png"}, + is_ground_content = true, + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:christmas_lights", { + description = "christmas lights", + drawtype = "signlike", + light_source = 10, + walkable = false, + tiles = { + {name="lights_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "c_lights.png", + wield_image = "c_lights.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, +}) + +minetest.register_node("christmas_craft:christmas_wreath", { + description = "Christmas Wreath", + drawtype = "signlike", + walkable = false, + tiles = { + {name="Wreath.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "Wreath.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, +}) + +minetest.register_node("christmas_craft:christmas_star", { + description = "christmas Star", + drawtype = "plantlike", + light_source = 10, + tiles = {"star.png"}, + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:snow_block", { + description = "snow block", + tiles = {"snow.png"}, + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:christmas_leaves", { + description = "Christmas leaves", + drawtype = "allfaces_optional", + tiles = {"christmas_leaves.png"}, + is_ground_content = false, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:Christmas_present", { + description = "Christmas present ", + tiles = {"present_top.png", "present_bottom.png", "present_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_green", { + description = "Christmas present green ", + tiles = {"present_top_gr.png", "present_bottom_gr.png", "present_side_gr.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_blue", { + description = "Christmas present blue ", + tiles = {"present_top_bl.png", "present_bottom_bl.png", "present_side_bl.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_red", { + description = "Christmas present red ", + tiles = {"present_top_re.png", "present_bottom_re.png", "present_side_re.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_yellow", { + description = "Christmas present yellow ", + tiles = {"present_top_ye.png", "present_bottom_ye.png", "present_side_ye.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:red_baubles", { + description = "Red Baubles", + drawtype = "plantlike", + tiles = {"red_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:yellow_baubles", { + description = "Yellow Baubles", + drawtype = "plantlike", + tiles = {"yellow_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:blue_baubles", { + description = "Blue Baubles", + drawtype = "plantlike", + tiles = {"blue_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:green_baubles", { + description = "Green Baubles", + drawtype = "plantlike", + tiles = {"green_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:silver_baubles", { + description = "Silver Baubles", + drawtype = "plantlike", + tiles = {"silver_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +-- items -- + +minetest.register_craftitem("christmas_craft:paper_blue", { + description = "Blue paper", + inventory_image = "paper_bl.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:paper_yellow", { + description = "Yellow paper", + inventory_image = "paper_ye.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:paper_green", { + description = "Green paper", + inventory_image = "paper_gr.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:paper_red", { + description = "Red paper", + inventory_image = "paper_re.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:iron_nugget", { + description = "Iron nugget", + inventory_image = "iron_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:tin_nugget", { + description = "Tin nugget", + inventory_image = "tin_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +-- minetest.register_craftitem("christmas_craft:snow_ball", { +-- description = "Snow ball", +-- inventory_image = "snow_ball.png", +-- stack_max = 16, +-- liquids_pointable = false, +--}) + +minetest.register_craftitem("christmas_craft:gold_nugget", { + description = "Gold nugget", + inventory_image = "gold_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:mithril_nugget", { + description = "Mithril nugget", + inventory_image = "mithril_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:cactus_bit", { + description = "Cactus_bit", + inventory_image = "Cactus_bit.png", + stack_max = 99, + liquids_pointable = false, +}) + +-- crafts -- + +minetest.register_craft({ + output = '"christmas_craft:snowman" 1', + recipe = { + {"default:coal_lump","christmas_craft:snowball","default:coal_lump"}, + {"christmas_craft:snowball","christmas_craft:snowball","christmas_craft:snowball"}, + {"default:coal_lump","default:coal_lump","default:coal_lump"}, + } +}) +------ +minetest.register_craft({ + output = '"christmas_craft:snow_block" 1', + recipe = { + {"christmas_craft:snowball","christmas_craft:snowball"}, + {"christmas_craft:snowball","christmas_craft:snowball"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_blue" 1', + recipe = { + {"christmas_craft:mithril_nugget"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_red" 1', + recipe = { + {"christmas_craft:iron_nugget"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_yellow" 1', + recipe = { + {"christmas_craft:gold_nugget"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:paper_green" 1', + recipe = { + {"christmas_craft:cactus_bit"}, + {"default:paper"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_leaves" 4', + recipe = { + {"default:leaves"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:iron_nugget" 9', + recipe = { + {"default:iron_lump"}, + } +}) + + +minetest.register_craft({ + output = '"christmas_craft:gold_nugget" 9', + recipe = { + {"moreores:gold_lump"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:mithril_nugget" 9', + recipe = { + {"moreores:mithril_lump"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:cactus_bit" 9', + recipe = { + {"default:cactus"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:tin_nugget" 9', + recipe = { + {"moreores:tin_lump"}, + } +}) + +minetest.register_craft({ + output = '"default:iron_lump" 1', + recipe = { + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget", "christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget", "christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget", "christmas_craft:iron_nugget"}, + } +}) + +minetest.register_craft({ + output = '"moreores:gold_lump" 1', + recipe = { + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget", "christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget", "christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget", "christmas_craft:gold_nugget"}, + } +}) + +minetest.register_craft({ + output = '"moreores:mithril_lump" 1', + recipe = { + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget"}, + } +}) + +minetest.register_craft({ + output = '"default:cactus" 1', + recipe = { + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit", "christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit", "christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit", "christmas_craft:cactus_bit"}, + } +}) + +minetest.register_craft({ + output = '"moreores:tin_lump" 1', + recipe = { + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget", "christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget", "christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget", "christmas_craft:tin_nugget"}, + } +}) + + +minetest.register_craft({ + output = '"christmas_craft:red_baubles" 1', + recipe = { + {"christmas_craft:iron_nugget", "default:stick","christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "default:glass","christmas_craft:iron_nugget"}, + {"christmas_craft:iron_nugget", "christmas_craft:iron_nugget","christmas_craft:iron_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:yellow_baubles" 1', + recipe = { + {"christmas_craft:gold_nugget", "default:stick","christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "default:glass","christmas_craft:gold_nugget"}, + {"christmas_craft:gold_nugget", "christmas_craft:gold_nugget","christmas_craft:gold_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:blue_baubles" 1', + recipe = { + {"christmas_craft:mithril_nugget", "default:stick","christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "default:glass","christmas_craft:mithril_nugget"}, + {"christmas_craft:mithril_nugget", "christmas_craft:mithril_nugget","christmas_craft:mithril_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:green_baubles" 1', + recipe = { + {"christmas_craft:cactus_bit", "default:stick","christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "default:glass","christmas_craft:cactus_bit"}, + {"christmas_craft:cactus_bit", "christmas_craft:cactus_bit","christmas_craft:cactus_bit"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:silver_baubles" 1', + recipe = { + {"christmas_craft:tin_nugget", "default:stick","christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "default:glass","christmas_craft:tin_nugget"}, + {"christmas_craft:tin_nugget", "christmas_craft:tin_nugget","christmas_craft:tin_nugget"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present" 1', + recipe = { + {"default:paper", "default:paper","default:paper"}, + {"default:paper", "default:mese","default:paper"}, + {"default:paper", "default:paper","default:paper"}, + } +}) + +-- paper -- + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_green" 1', + recipe = { + {"christmas_craft:paper_green", "christmas_craft:paper_green","christmas_craft:paper_green"}, + {"christmas_craft:paper_green", "default:mese","christmas_craft:paper_green"}, + {"christmas_craft:paper_green", "christmas_craft:paper_green","christmas_craft:paper_green"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_yellow" 1', + recipe = { + {"christmas_craft:paper_yellow", "christmas_craft:paper_yellow","christmas_craft:paper_yellow"}, + {"christmas_craft:paper_yellow", "default:mese","christmas_craft:paper_yellow"}, + {"christmas_craft:paper_yellow", "christmas_craft:paper_yellow","christmas_craft:paper_yellow"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_red" 1', + recipe = { + {"christmas_craft:paper_red", "christmas_craft:paper_red","christmas_craft:paper_red"}, + {"christmas_craft:paper_red", "default:mese","christmas_craft:paper_red"}, + {"christmas_craft:paper_red", "christmas_craft:paper_red","christmas_craft:paper_red"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:Christmas_present_blue" 1', + recipe = { + {"christmas_craft:paper_blue", "christmas_craft:paper_blue","christmas_craft:paper_blue"}, + {"christmas_craft:paper_blue", "default:mese","christmas_craft:paper_blue"}, + {"christmas_craft:paper_blue", "christmas_craft:paper_blue","christmas_craft:paper_blue"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_wreath" 1', + recipe = { + {"", "christmas_craft:christmas_leaves",""}, + {"christmas_craft:christmas_leaves", "","christmas_craft:christmas_leaves"}, + {"", "christmas_craft:christmas_leaves",""}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_star" 1', + recipe = { + {"", "moreores:gold_ingot",""}, + {"moreores:gold_ingot", "moreores:gold_ingot","moreores:gold_ingot"}, + {"", "moreores:gold_ingot",""}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:christmas_lights" 18', + recipe = { + {"default:mese","default:mese"}, + {"default:glass","default:glass"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:snowball" 4', + recipe = { + {"christmas_craft:snow_block"}, + } +}) + +minetest.register_craft({ + output = '"christmas_craft:snow" 3', + recipe = { + {"christmas_craft:snowball","christmas_craft:snowball","christmas_craft:snowball"}, + } +}) + +-- override -- + +minetest.register_node(":default:dirt_with_grass", { + description = "Dirt with Grass", + tiles = {"snow.png", "default_dirt.png", "grass_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 2, items = { + {items = {'default:dirt'}, rarity = 0,}, + {items = {'christmas_craft:snowball'}, rarity = 0,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node(":default:leaves", { + description = "Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"leaves_w_snow.png"}, + paramtype = "light", + groups = {snappy=3, leafdecay=3, flammable=2}, + drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {'default:sapling'}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {'default:leaves'}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node(":default:desert_sand", { + description = "Desert sand", + tiles = {"snow.png", "default_sand.png", "sand_w_snow_side.png"}, + drop = { + max_items = 2, items = { + {items = {'default:desert_sand'}, rarity = 0,}, + {items = {'christmas_craft:snowball'}, rarity = 0,}, + }}, + is_ground_content = true, + groups = {crumbly=3, falling_node=1}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node(":default:dirt_with_grass_footsteps", { + description = "Dirt with Grass and Footsteps", + tiles = {"snow_footstep"}, + is_ground_content = true, + groups = {crumbly=3, not_in_creative_inventory=1}, + drop = 'default:dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node(":default:stick", { + description = "stick", + drawtype = "torchlike", + --tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"}, + tiles = { + {name="side_stick.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}} + }, + inventory_image = "default_stick.png", + wield_image = "default_stick.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "wallmounted", + wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1}, + }, + groups = {choppy=2,dig_immediate=3,flammable=1}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), +}) + +-- complex node -- + + +snowball_GRAVITY=9 +snowball_VELOCITY=19 + +--Shoot snowball. +local snow_shoot_snowball=function (item, player, pointed_thing) + local playerpos=player:getpos() + local obj=minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, "christmas_craft:snowball_entity") + local dir=player:get_look_dir() + obj:setvelocity({x=dir.x*snowball_VELOCITY, y=dir.y*snowball_VELOCITY, z=dir.z*snowball_VELOCITY}) + obj:setacceleration({x=dir.x*-3, y=-snowball_GRAVITY, z=dir.z*-3}) + item:take_item() + return item +end + +--The snowball Entity +snow_snowball_ENTITY={ + physical = false, + timer=0, + textures = {"snowball.png"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +--Snowball_entity.on_step()--> called when snowball is moving. +snow_snowball_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + --Become item when hitting a node. + if self.lastpos.x~=nil then --If there is no lastpos for some reason. + if node.name ~= "air" then + minetest.env:place_node(self.lastpos,{name="air"}) + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node +end + +minetest.register_entity("christmas_craft:snowball_entity", snow_snowball_ENTITY) + +--Snowball. +minetest.register_craftitem("christmas_craft:snowball", { + Description = "Snowball", + inventory_image = "snowball.png", + on_use = snow_shoot_snowball, +}) + +--Snow. +minetest.register_node("christmas_craft:snow", { + tiles = {"snow.png"}, + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + param2 = nil, + --param2 is reserved for what vegetation is hiding inside. + --mapgen defines the vegetation. + --1 = Moss + groups = {crumbly=3,melts=1,falling_node=1}, + buildable_to = true, + drop = 'christmas_craft:snowball', + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.35, 0.5} + }, + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.35, 0.5} + }, + }, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.45}, + }), +}) + + diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..cfa2c05 --- /dev/null +++ b/init.lua @@ -0,0 +1,488 @@ +--dofile(minetest.get_modpath("christmas_craft").."/mods.lua")--disabled because 4seasons is not installed +--dofile("crafts.lua");--temporary disabled because cristmas is over +-- blocks -- + +minetest.register_node("christmas_craft:snowman", { + description = "Snowman", + tiles = {"snow.png", "snow.png", "snow.png", + "snow.png", "snow.png", "Snowman_F.png"}, + is_ground_content = true, + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + + + +minetest.register_node("christmas_craft:christmas_lights", { + description = "christmas lights", + drawtype = "signlike", + light_source = 10, + walkable = false, + tiles = { + {name="lights_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "c_lights.png", + wield_image = "c_lights.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, +}) + +minetest.register_node("christmas_craft:christmas_wreath", { + description = "Christmas Wreath", + drawtype = "signlike", + walkable = false, + tiles = { + {name="Wreath.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "Wreath.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, +}) + +minetest.register_node("christmas_craft:christmas_star", { + description = "christmas Star", + drawtype = "plantlike", + light_source = 10, + tiles = {"star.png"}, + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:snow_block", { + description = "snow block", + tiles = {"snow.png"}, + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:christmas_leaves", { + description = "Christmas leaves", + drawtype = "allfaces_optional", + tiles = {"christmas_leaves.png"}, + is_ground_content = false, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:Christmas_present", { + description = "Christmas present ", + tiles = {"present_top.png", "present_bottom.png", "present_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_green", { + description = "Christmas present green ", + tiles = {"present_top_gr.png", "present_bottom_gr.png", "present_side_gr.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_blue", { + description = "Christmas present blue ", + tiles = {"present_top_bl.png", "present_bottom_bl.png", "present_side_bl.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_red", { + description = "Christmas present red ", + tiles = {"present_top_re.png", "present_bottom_re.png", "present_side_re.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:Christmas_present_yellow", { + description = "Christmas present yellow ", + tiles = {"present_top_ye.png", "present_bottom_ye.png", "present_side_ye.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 10,}, + {items = {'default:clay'}, rarity = 10,}, + {items = {'default:pick_mese'}, rarity = 20,}, + {items = {'default:shovel_steel'}, rarity = 15,}, + {items = {'default:axe_steel'}, rarity = 15,}, + {items = {'default:pick_steel'}, rarity = 15,}, + {items = {'default:sign_wall'}, rarity = 20,}, + {items = {'default:chest'}, rarity = 20,}, + {items = {'default:furnace'}, rarity = 20,}, + {items = {'default:steelblock'}, rarity = 25,}, + {items = {'default:coal_lump'}, rarity = 25,}, + {items = {'default:stone'}, rarity = 2,}, + {items = {'diamonds:pick'}, rarity = 70,}, + {items = {'diamonds:shovel'}, rarity = 70,}, + {items = {'diamonds:axe'}, rarity = 70,}, + {items = {'diamonds:block'}, rarity = 90,}, + {items = {'fake_fire:flint_and_steel'}, rarity = 15,}, + {items = {'default:chest_locked'}, rarity = 20,}, + {items = {'default:ladder'}, rarity = 15,}, + {items = {'default:jungletree'}, rarity = 30,}, + {items = {'default:brick'}, rarity = 25,}, + {items = {'default:dirt_with_grass'}, rarity = 30,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_node("christmas_craft:red_baubles", { + description = "Red Baubles", + drawtype = "plantlike", + tiles = {"red_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:yellow_baubles", { + description = "Yellow Baubles", + drawtype = "plantlike", + tiles = {"yellow_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:blue_baubles", { + description = "Blue Baubles", + drawtype = "plantlike", + tiles = {"blue_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:green_baubles", { + description = "Green Baubles", + drawtype = "plantlike", + tiles = {"green_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:silver_baubles", { + description = "Silver Baubles", + drawtype = "plantlike", + tiles = {"silver_baubles.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +-- items -- + +minetest.register_craftitem("christmas_craft:paper_blue", { + description = "Blue paper", + inventory_image = "paper_bl.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:paper_yellow", { + description = "Yellow paper", + inventory_image = "paper_ye.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:paper_green", { + description = "Green paper", + inventory_image = "paper_gr.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:paper_red", { + description = "Red paper", + inventory_image = "paper_re.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:iron_nugget", { + description = "Iron nugget", + inventory_image = "iron_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:tin_nugget", { + description = "Tin nugget", + inventory_image = "tin_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +-- minetest.register_craftitem("christmas_craft:snow_ball", { +-- description = "Snow ball", +-- inventory_image = "snow_ball.png", +-- stack_max = 16, +-- liquids_pointable = false, +--}) + +minetest.register_craftitem("christmas_craft:gold_nugget", { + description = "Gold nugget", + inventory_image = "gold_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:mithril_nugget", { + description = "Mithril nugget", + inventory_image = "mithril_nugget.png", + stack_max = 99, + liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:cactus_bit", { + description = "Cactus_bit", + inventory_image = "Cactus_bit.png", + stack_max = 99, + liquids_pointable = false, +}) + +-- crafts -- + +--for craft see in craft.lua + +-- override -- +--minetest.registered_nodes["default:stick"].drawtype="torchlike"; +--minetest.registered_nodes["default:stick"].selection_box = { +-- type = "wallmounted", +-- wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1}, +-- } + +minetest.register_node(":default:stick", { + description = "stick", + drawtype = "torchlike", + --tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"}, + tiles = {"side_stick.png"}, + inventory_image = "default_stick.png", + wield_image = "default_stick.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "wallmounted", + wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1}, + }, + groups = {choppy=2,dig_immediate=3,flammable=1}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), +}) + +-- complex node -- + +snowball_DAMAGE=0.5 +snowball_GRAVITY=9 +snowball_VELOCITY=19 + +--Shoot snowball. +local snow_shoot_snowball=function (item, player, pointed_thing) + local playerpos=player:getpos() + local obj=minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, "christmas_craft:snowball_entity") + local dir=player:get_look_dir() + obj:setvelocity({x=dir.x*snowball_VELOCITY, y=dir.y*snowball_VELOCITY, z=dir.z*snowball_VELOCITY}) + obj:setacceleration({x=dir.x*-3, y=-snowball_GRAVITY, z=dir.z*-3}) + item:take_item() + return item +end + +--The snowball Entity +snow_snowball_ENTITY={ + physical = false, + timer=0, + textures = {"snowball.png"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +--Snowball_entity.on_step()--> called when snowball is moving. +snow_snowball_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + --Become item when hitting a node. + if self.lastpos.x~=nil then --If there is no lastpos for some reason. + if node.name ~= "air" then + minetest.env:place_node(self.lastpos,{name="air"}) + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} -- Set lastpos-->Node will be added at last pos outside the node +end + +minetest.register_entity("christmas_craft:snowball_entity", snow_snowball_ENTITY) + +--Snowball. +minetest.register_craftitem("christmas_craft:snowball", { + Description = "Snowball", + inventory_image = "snowball.png", + on_use = snow_shoot_snowball, +}) + +--Snow. +minetest.register_node("christmas_craft:snow", { + tiles = {"snow.png"}, + drawtype = "nodebox", + sunlight_propagates = true, + paramtype = "light", + param2 = nil, + --param2 is reserved for what vegetation is hiding inside. + --mapgen defines the vegetation. + --1 = Moss + groups = {crumbly=3,melts=1,falling_node=1}, + buildable_to = true, + drop = 'christmas_craft:snowball', + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.35, 0.5} + }, + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.35, 0.5} + }, + }, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.45}, + }), +}) + + diff --git a/mods.lua b/mods.lua new file mode 100644 index 0000000..4fc81c9 --- /dev/null +++ b/mods.lua @@ -0,0 +1,87 @@ + +print (" ---- mods override is Loading! ---- ") + +-- leaves -- + + +--minetest.register_node(":4seasons:leaves_winter", { +-- description = "Leaves", +-- drawtype = "allfaces_optional", +-- visual_scale = 1.3, +-- tile_images = {"4seasons_leaves_with_snow.png"}, +-- paramtype = "light", +-- groups = {snappy=3, leafdecay=3, flammable=2}, +-- drop = { +-- max_items = 1, items = { +-- {items = {'default:sapling'}, rarity = 20,}, +-- {items = {'4seasons:leaves_winter'},} +-- }}, +-- sounds = default.node_sound_leaves_defaults(), +--}) + + -- why are u overwriting that? its just the normal 4 season leaves. + + + -- grass -- + +minetest.register_node(":4seasons:grass_winter", { + description = "Dirt with snow", + tiles = {"4seasons_snow.png", "default_dirt.png", "default_dirt.png^4seasons_grass_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 2, items = { + {items = {'default:dirt'}, rarity = 0,}, + {items = {'christmas_craft:snowball'}, rarity = 0,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +--normal sand +minetest.register_node(":4seasons:sand_winter", { + description = "Sand with snow", + tiles = {"4seasons_snow.png", "default_sand.png", "default_sand.png^4seasons_sand_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = {'default:sand', + max_items = 2, items = { + {items = {'default:sand'}, rarity = 0,}, + {items = {'christmas_craft:snowball'}, rarity = 0,}, + }}, + + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) +--desert sand +minetest.register_node(":4seasons:desertsand_winter", { + description = "Desert Sand with snow", + tiles = {"4seasons_snow.png", "default_desert_sand.png", "default_desert_sand.png^4seasons_desertsand_w_snow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = {'default:desert_sand', + max_items = 2, items = { + {items = {'default:desert_sand'}, rarity = 0,}, + {items = {'christmas_craft:snowball'}, rarity = 0,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +--cactus winter + +minetest.register_node(":4seasons:cactus_winter", { + description = "Cactus", + tiles = {"4seasons_cactus_wsnow_top.png", "4seasons_cactus_wsnow_top.png", "4seasons_cactus_wsnow_side.png"}, + is_ground_content = true, + groups = {snappy=2,choppy=3,flammable=2}, + drop = {'default:cactus', + max_items = 2, items = { + {items = {'default:cactus'}, rarity = 0,}, + {items = {'christmas_craft:snowball'}, rarity = 0,}, + }}, + sounds = default.node_sound_wood_defaults(), +}) \ No newline at end of file diff --git a/textures/Cactus_bit.png b/textures/Cactus_bit.png new file mode 100644 index 0000000..4dc6e9b Binary files /dev/null and b/textures/Cactus_bit.png differ diff --git a/textures/Snowman_F.png b/textures/Snowman_F.png new file mode 100644 index 0000000..6c5a6cc Binary files /dev/null and b/textures/Snowman_F.png differ diff --git a/textures/Wreath.png b/textures/Wreath.png new file mode 100644 index 0000000..6103e91 Binary files /dev/null and b/textures/Wreath.png differ diff --git a/textures/blue_baubles.png b/textures/blue_baubles.png new file mode 100644 index 0000000..a254e58 Binary files /dev/null and b/textures/blue_baubles.png differ diff --git a/textures/c_lights.png b/textures/c_lights.png new file mode 100644 index 0000000..912d2b8 Binary files /dev/null and b/textures/c_lights.png differ diff --git a/textures/christmas_leaves.png b/textures/christmas_leaves.png new file mode 100644 index 0000000..93236e3 Binary files /dev/null and b/textures/christmas_leaves.png differ diff --git a/textures/default_stick.png b/textures/default_stick.png new file mode 100644 index 0000000..2d31797 Binary files /dev/null and b/textures/default_stick.png differ diff --git a/textures/gold_nugget.png b/textures/gold_nugget.png new file mode 100644 index 0000000..a49eca2 Binary files /dev/null and b/textures/gold_nugget.png differ diff --git a/textures/grass_w_snow_side.png b/textures/grass_w_snow_side.png new file mode 100644 index 0000000..28ed3d2 Binary files /dev/null and b/textures/grass_w_snow_side.png differ diff --git a/textures/green_baubles.png b/textures/green_baubles.png new file mode 100644 index 0000000..9e34f9c Binary files /dev/null and b/textures/green_baubles.png differ diff --git a/textures/iron_nugget.png b/textures/iron_nugget.png new file mode 100644 index 0000000..bcda0b0 Binary files /dev/null and b/textures/iron_nugget.png differ diff --git a/textures/leaves_w_snow.png b/textures/leaves_w_snow.png new file mode 100644 index 0000000..954c9ec Binary files /dev/null and b/textures/leaves_w_snow.png differ diff --git a/textures/lights_animated.pdn b/textures/lights_animated.pdn new file mode 100644 index 0000000..3cf0ece Binary files /dev/null and b/textures/lights_animated.pdn differ diff --git a/textures/lights_animated.png b/textures/lights_animated.png new file mode 100644 index 0000000..d66fe7e Binary files /dev/null and b/textures/lights_animated.png differ diff --git a/textures/mithril_nugget.png b/textures/mithril_nugget.png new file mode 100644 index 0000000..95f7dc2 Binary files /dev/null and b/textures/mithril_nugget.png differ diff --git a/textures/paper_bl.png b/textures/paper_bl.png new file mode 100644 index 0000000..7c536c6 Binary files /dev/null and b/textures/paper_bl.png differ diff --git a/textures/paper_gr.png b/textures/paper_gr.png new file mode 100644 index 0000000..0ec9c78 Binary files /dev/null and b/textures/paper_gr.png differ diff --git a/textures/paper_re.png b/textures/paper_re.png new file mode 100644 index 0000000..9e1b4d7 Binary files /dev/null and b/textures/paper_re.png differ diff --git a/textures/paper_ye.png b/textures/paper_ye.png new file mode 100644 index 0000000..b6bc9f4 Binary files /dev/null and b/textures/paper_ye.png differ diff --git a/textures/present_bottom.png b/textures/present_bottom.png new file mode 100644 index 0000000..470952b Binary files /dev/null and b/textures/present_bottom.png differ diff --git a/textures/present_bottom_bl.png b/textures/present_bottom_bl.png new file mode 100644 index 0000000..bd09e8d Binary files /dev/null and b/textures/present_bottom_bl.png differ diff --git a/textures/present_bottom_gr.png b/textures/present_bottom_gr.png new file mode 100644 index 0000000..6589785 Binary files /dev/null and b/textures/present_bottom_gr.png differ diff --git a/textures/present_bottom_re.png b/textures/present_bottom_re.png new file mode 100644 index 0000000..d8fd82f Binary files /dev/null and b/textures/present_bottom_re.png differ diff --git a/textures/present_bottom_ye.png b/textures/present_bottom_ye.png new file mode 100644 index 0000000..c1a1750 Binary files /dev/null and b/textures/present_bottom_ye.png differ diff --git a/textures/present_side.png b/textures/present_side.png new file mode 100644 index 0000000..dad2dc2 Binary files /dev/null and b/textures/present_side.png differ diff --git a/textures/present_side_bl.png b/textures/present_side_bl.png new file mode 100644 index 0000000..fd28e42 Binary files /dev/null and b/textures/present_side_bl.png differ diff --git a/textures/present_side_gr.png b/textures/present_side_gr.png new file mode 100644 index 0000000..f57fb8b Binary files /dev/null and b/textures/present_side_gr.png differ diff --git a/textures/present_side_re.png b/textures/present_side_re.png new file mode 100644 index 0000000..b9312c2 Binary files /dev/null and b/textures/present_side_re.png differ diff --git a/textures/present_side_ye.png b/textures/present_side_ye.png new file mode 100644 index 0000000..264f620 Binary files /dev/null and b/textures/present_side_ye.png differ diff --git a/textures/present_top.png b/textures/present_top.png new file mode 100644 index 0000000..ea17702 Binary files /dev/null and b/textures/present_top.png differ diff --git a/textures/present_top_bl.png b/textures/present_top_bl.png new file mode 100644 index 0000000..fcb5110 Binary files /dev/null and b/textures/present_top_bl.png differ diff --git a/textures/present_top_gr.png b/textures/present_top_gr.png new file mode 100644 index 0000000..8f93834 Binary files /dev/null and b/textures/present_top_gr.png differ diff --git a/textures/present_top_re.png b/textures/present_top_re.png new file mode 100644 index 0000000..bbc65b5 Binary files /dev/null and b/textures/present_top_re.png differ diff --git a/textures/present_top_ye.png b/textures/present_top_ye.png new file mode 100644 index 0000000..9096739 Binary files /dev/null and b/textures/present_top_ye.png differ diff --git a/textures/red_baubles.png b/textures/red_baubles.png new file mode 100644 index 0000000..491ddb5 Binary files /dev/null and b/textures/red_baubles.png differ diff --git a/textures/sand_w_snow_side.png b/textures/sand_w_snow_side.png new file mode 100644 index 0000000..477dff1 Binary files /dev/null and b/textures/sand_w_snow_side.png differ diff --git a/textures/side_stick.png b/textures/side_stick.png new file mode 100644 index 0000000..5475179 Binary files /dev/null and b/textures/side_stick.png differ diff --git a/textures/silver_baubles.png b/textures/silver_baubles.png new file mode 100644 index 0000000..5db8029 Binary files /dev/null and b/textures/silver_baubles.png differ diff --git a/textures/snow.png b/textures/snow.png new file mode 100644 index 0000000..ab77602 Binary files /dev/null and b/textures/snow.png differ diff --git a/textures/snow_ball.png b/textures/snow_ball.png new file mode 100644 index 0000000..711ddf0 Binary files /dev/null and b/textures/snow_ball.png differ diff --git a/textures/snow_footstep.png b/textures/snow_footstep.png new file mode 100644 index 0000000..7525936 Binary files /dev/null and b/textures/snow_footstep.png differ diff --git a/textures/snowball.png b/textures/snowball.png new file mode 100644 index 0000000..711ddf0 Binary files /dev/null and b/textures/snowball.png differ diff --git a/textures/star.png b/textures/star.png new file mode 100644 index 0000000..8b8d431 Binary files /dev/null and b/textures/star.png differ diff --git a/textures/tin_nugget.png b/textures/tin_nugget.png new file mode 100644 index 0000000..cc32e9f Binary files /dev/null and b/textures/tin_nugget.png differ diff --git a/textures/yellow_baubles.png b/textures/yellow_baubles.png new file mode 100644 index 0000000..98fad5f Binary files /dev/null and b/textures/yellow_baubles.png differ