code:
-- Nodes
	-- 9 Candy Canes into 3 Candy Cane Blocks.
        minetest.register_craft({
                output = "christmas_holiday_pack:candy_cane_block 3",
                recipe = {
                        {"christmas_holiday_pack:candy_cane", "christmas_holiday_pack:candy_cane", "christmas_holiday_pack:candy_cane"},
                        {"christmas_holiday_pack:candy_cane", "christmas_holiday_pack:candy_cane", "christmas_holiday_pack:candy_cane"},
                        {"christmas_holiday_pack:candy_cane", "christmas_holiday_pack:candy_cane", "christmas_holiday_pack:candy_cane"},
                },
        })

	-- 9 Green Candy Canes into 3 Green Candy Cane Blocks.
        minetest.register_craft({
                output = "christmas_holiday_pack:green_candy_cane_block 3",
                recipe = {
                        {"christmas_holiday_pack:green_candy_cane", "christmas_holiday_pack:green_candy_cane", "christmas_holiday_pack:green_candy_cane"},
                        {"christmas_holiday_pack:green_candy_cane", "christmas_holiday_pack:green_candy_cane", "christmas_holiday_pack:green_candy_cane"},
                        {"christmas_holiday_pack:green_candy_cane", "christmas_holiday_pack:green_candy_cane", "christmas_holiday_pack:green_candy_cane"},
                },
        })

	-- 9 Gingerbread Men into 3 Gingerbread Blocks.
        minetest.register_craft({
                output = "christmas_holiday_pack:gingerbread_block 3",
                recipe = {
                        {"christmas_holiday_pack:gingerbread_man", "christmas_holiday_pack:gingerbread_man", "christmas_holiday_pack:gingerbread_man"},
                        {"christmas_holiday_pack:gingerbread_man", "christmas_holiday_pack:gingerbread_man", "christmas_holiday_pack:gingerbread_man"},
                        {"christmas_holiday_pack:gingerbread_man", "christmas_holiday_pack:gingerbread_man", "christmas_holiday_pack:gingerbread_man"},
                },
        })

        -- 9 Gingerbread into 3 Gingerbread Blocks.
        minetest.register_craft({
                output = "christmas_holiday_pack:gingerbread_block 3",
                recipe = {
                        {"christmas_holiday_pack:gingerbread", "christmas_holiday_pack:gingerbread", "christmas_holiday_pack:gingerbread"},
                        {"christmas_holiday_pack:gingerbread", "christmas_holiday_pack:gingerbread", "christmas_holiday_pack:gingerbread"},
                        {"christmas_holiday_pack:gingerbread", "christmas_holiday_pack:gingerbread", "christmas_holiday_pack:gingerbread"},
                },
        })

	-- Frosting Block
        minetest.register_craft({
                output = "christmas_holiday_pack:frosting_block 3",
                recipe = {
                        {"group:food_sugar", "group:food_sugar", "group:food_sugar"},
                        {"group:food_sugar", "mobs_creatures:milk_bucket", "group:food_sugar"},
                        {"group:food_sugar", "group:food_sugar", "group:food_sugar"},
		},
		replacements = {{"mobs_creatures:milk_bucket", "mesecraft_bucket:bucket_empty"}},
        })

-- 3d_armor : Candy Cane Armor
	minetest.register_craft({
		output = "christmas_holiday_pack:helmet_cane",
		recipe = {
			{"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "", "christmas_holiday_pack:candy_cane_block"},
			{"", "", ""},
		},
	})
	minetest.register_craft({
		output = "christmas_holiday_pack:chestplate_cane",
		recipe = {
			{"christmas_holiday_pack:candy_cane_block", "", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
		},
	})
	minetest.register_craft({
		output = "christmas_holiday_pack:leggings_cane",
		recipe = {
			{"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "", "christmas_holiday_pack:candy_cane_block"},
		},
	})
	minetest.register_craft({
		output = "christmas_holiday_pack:boots_cane",
		recipe = {
			{"christmas_holiday_pack:candy_cane_block", "", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "", "christmas_holiday_pack:candy_cane_block"},
		},
	})
	minetest.register_craft({
		output = "christmas_holiday_pack:shield_cane",
		recipe = {
			{"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
			{"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
			{"", "christmas_holiday_pack:candy_cane_block", ""},
		},
	})
-- Candy Cane Pickaxe
        minetest.register_craft({
                output = "christmas_holiday_pack:candy_cane_pickaxe",
                recipe = {
                        {"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block"},
                        {"", "christmas_holiday_pack:candy_cane", ""},
                        {"", "christmas_holiday_pack:candy_cane", ""},
                },
        })
-- Candy Cane Axe
        minetest.register_craft({
                output = "christmas_holiday_pack:candy_cane_axe",
                recipe = {
                        {"christmas_holiday_pack:candy_cane_block", "christmas_holiday_pack:candy_cane_block", ""},
                        {"", "christmas_holiday_pack:candy_cane", ""},
                        {"", "christmas_holiday_pack:candy_cane", ""},
                },
        })
-- Candy Cane Sword
        minetest.register_craft({
                output = "christmas_holiday_pack:candy_cane_sword",
                recipe = {
                        {"", "christmas_holiday_pack:candy_cane_block", ""},
                        {"", "christmas_holiday_pack:candy_cane_block", ""},
                        {"", "christmas_holiday_pack:candy_cane", ""},
                },
        })

-- Christmas Bell
-- Mistletoe
-- Christmas Reef
-- Icicles
-- Christmas Tree Star

-- Garland
minetest.register_craft({
        output = "christmas_holiday_pack:garland 3",
	type = "shapeless",
        recipe = {"default:pine_needles", "default:pine_needles", "default:pine_needles"},
})
-- Festive Garland
minetest.register_craft({
        output = "christmas_holiday_pack:festive_garland",
	type = "shapeless",
        recipe = {"christmas_holiday_pack:garland", "farming:raspberries"},
})
-- Festive Garland with Lights
minetest.register_craft({
        output = "christmas_holiday_pack:festive_garland_lights",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:festive_garland", "holiday_lights:lights_white"},
})

-- Red Garland
minetest.register_craft({
        output = "christmas_holiday_pack:garland_red 3",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:garland","christmas_holiday_pack:garland","christmas_holiday_pack:garland", "dye:red"},
})

-- Yellow Garland
minetest.register_craft({
        output = "christmas_holiday_pack:garland_yellow 3",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:garland","christmas_holiday_pack:garland","christmas_holiday_pack:garland", "dye:yellow"},
})

-- White Garland
minetest.register_craft({
        output = "christmas_holiday_pack:garland_white 3",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:garland","christmas_holiday_pack:garland","christmas_holiday_pack:garland", "dye:white"},
})

-- ORNAMENTS
-- SKIPPED

-- CRAFT ITEMS

-- Candy Cane
-- SKIPPED

-- Green Candy Cane
-- SKIPPED

-- Peppermint Candies
minetest.register_craft({
        output = "christmas_holiday_pack:peppermint_candies 8",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:peppermint","christmas_holiday_pack:peppermint","group:food_sugar", "group:food_sugar", "dye:red", "farming:mortar_pestle"},
        replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}},
})

-- Green Peppermint Candies
minetest.register_craft({
        output = "christmas_holiday_pack:green_peppermint_candies 8",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:peppermint","christmas_holiday_pack:peppermint","group:food_sugar", "group:food_sugar", "dye:green", "farming:mortar_pestle"},
        replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}},
})

-- Gingerbread Dough
minetest.register_craft({
        output = "christmas_holiday_pack:gingerbread_dough",
        type = "shapeless",
        recipe = {"christmas_holiday_pack:ginger","christmas_holiday_pack:ginger","group:food_flour", "group:food_flour", "group:food_sugar", "group:food_egg", "mobs_creatures:butter", "farming:mortar_pestle"},
        replacements = {{"farming:mortar_pestle", "farming:mortar_pestle"}},
})
-- Gingerbread Cooking Recipe
minetest.register_craft({
        type = "cooking",
        output = "christmas_holiday_pack:gingerbread",
        recipe = "christmas_holiday_pack:gingerbread_dough",
        cooktime = 10,
})
-- Gingerbread Cookie (Man)
-- SKIPPED

-- Sugar Cookie
minetest.register_craft({
        output = "christmas_holiday_pack:sugar_cookie 6",
        type = "shapeless",
        recipe = {"group:food_flour","group:food_flour", "group:food_sugar", "group:food_sugar", "group:food_egg", "mobs_creatures:butter"},
})
-- Bell Sugar Cookie
minetest.register_craft({
        output = "christmas_holiday_pack:sugar_cookie_bell 4",
        type = "shapeless",
        recipe = {"group:food_flour","group:food_flour", "group:food_sugar", "group:food_sugar", "group:food_egg", "mobs_creatures:butter", "dye:blue"},
})
-- Star Sugar Cookie
minetest.register_craft({
        output = "christmas_holiday_pack:sugar_cookie_star 4",
        type = "shapeless",
        recipe = {"group:food_flour","group:food_flour", "group:food_sugar", "group:food_sugar", "group:food_egg", "mobs_creatures:butter", "dye:red"},
})
-- Tree Sugar Cookie
minetest.register_craft({
        output = "christmas_holiday_pack:sugar_cookie_tree 4",
        type = "shapeless",
        recipe = {"group:food_flour","group:food_flour", "group:food_sugar", "group:food_sugar", "group:food_egg", "mobs_creatures:butter", "dye:green"},
})
-- Glass of Hot Chocolate
-- SKIPPED

-- Glass of Eggnog
-- SKIPPED, maybe use ginger

-- Stocking
--minetest.register_craft({
--      output = "christmas_holiday_pack:stocking",
--      recipe = {
--            {"farming:string", "wool:white", "wool:white"},
--              {"", "wool:red", "wool:red"},
--              {"wool:red", "wool:red", "wool:red"},
--      }
--})
-- Green Stockings
--minetest.register_craft({
--      output = "christmas_holiday_pack:green_stocking",
--      recipe = {
--              {"farming:string", "wool:white", "wool:white"},
--              {"", "wool:green", "wool:green"},
--             {"wool:green", "wool:green", "wool:green"},
--     }
--})


code:
-- PEPPERMINT
	-- Peppermint Leaf
	minetest.register_craftitem("christmas_holiday_pack:peppermint", {
		description = "Peppermint Leaf",
		inventory_image = "christmas_holiday_pack_peppermint_leaf.png",
		groups = {food_peppermint = 1, flammable = 2},
		on_use = minetest.item_eat(3),
	})

	-- Peppermint Seeds
	minetest.register_node("christmas_holiday_pack:peppermint_seeds", {
		description = "Peppermint Seeds",
		tiles = {"christmas_holiday_pack_peppermint_seeds.png"},
		inventory_image = "christmas_holiday_pack_peppermint_seeds.png",
		wield_image = "christmas_holiday_pack_peppermint_seeds.png",
		drawtype = "signlike",
		groups = {seed = 1, snappy = 3, attached_node = 1, flammable = 4},
		paramtype = "light",
		paramtype2 = "wallmounted",
		walkable = false,
		sunlight_propagates = true,
		selection_box = farming.select,
		on_place = function(itemstack, placer, pointed_thing)
			return farming.place_seed(itemstack, placer, pointed_thing, "christmas_holiday_pack:peppermint_0")
		end,
	})

	-- Peppermint Definition
	local crop_def = {
		drawtype = "plantlike",
		tiles = {"christmas_holiday_pack_peppermint_stage_0.png"},
		paramtype = "light",
		sunlight_propagates = true,
		walkable = false,
		buildable_to = true,
		drop = "",
		selection_box = farming.select,
		groups = {
			snappy = 3, flammable = 2, plant = 1, attached_node = 1,
			not_in_creative_inventory = 1, growing = 1
		},
		sounds = default.node_sound_leaves_defaults()
	}

	-- Stage 0
	minetest.register_node("christmas_holiday_pack:peppermint_0", table.copy(crop_def))

	-- Stage 1
	crop_def.tiles = {"christmas_holiday_pack_peppermint_stage_1.png"}
	minetest.register_node("christmas_holiday_pack:peppermint_1", table.copy(crop_def))

	-- Stage 2
	crop_def.tiles = {"christmas_holiday_pack_peppermint_stage_2.png"}
	crop_def.drop = {
		items = {
			{items = {"christmas_holiday_pack:peppermint"}, rarity = 2},
		}
	}
	minetest.register_node("christmas_holiday_pack:peppermint_2", table.copy(crop_def))

	-- Stage 3
	crop_def.tiles = {"christmas_holiday_pack_peppermint_stage_3.png"}
	crop_def.groups.growing = 0
	crop_def.drop = {
		items = {
			{items = {"christmas_holiday_pack:peppermint"}, rarity = 1},
			{items = {"christmas_holiday_pack:peppermint"}, rarity = 1},
			{items = {"christmas_holiday_pack:peppermint"}, rarity = 2},
			{items = {"christmas_holiday_pack:peppermint_seeds"}, rarity = 1},
			{items = {"christmas_holiday_pack:peppermint_seeds"}, rarity = 2},
		}
	}
	minetest.register_node("christmas_holiday_pack:peppermint_3", table.copy(crop_def))

	-- Add to Registered Plants
	farming.registered_plants["christmas_holiday_pack:peppermint"] = {
		crop = "christmas_holiday_pack:peppermint",
		seed = "christmas_holiday_pack:peppermint_seeds",
		minlight = 13,
		maxlight = 15,
		steps = 4,
	}

-- GINGER

-- Ginger Root
minetest.register_craftitem("christmas_holiday_pack:ginger", {
	description = "Ginger Root",
	inventory_image = "christmas_holiday_pack_ginger_root.png",
	groups = {food_ginger = 1, flammable = 2},
	on_use = minetest.item_eat(3),
	on_place = function(itemstack, placer, pointed_thing)
		return farming.place_seed(itemstack, placer, pointed_thing, "christmas_holiday_pack:ginger_0")
	end,
})

-- Ginger Definition
local crop_def = {
	drawtype = "plantlike",
	tiles = {"christmas_holiday_pack_ginger_stage_0.png"},
	paramtype = "light",
	sunlight_propagates = true,
	walkable = false,
	buildable_to = true,
	drop = "",
	selection_box = farming.select,
	groups = {
		snappy = 3, flammable = 2, plant = 1, attached_node = 1,
		not_in_creative_inventory = 1, growing = 1
	},
	sounds = default.node_sound_leaves_defaults()
}

-- Stage 0
minetest.register_node("christmas_holiday_pack:ginger_0", table.copy(crop_def))

-- Stage 1
crop_def.tiles = {"christmas_holiday_pack_ginger_stage_1.png"}
minetest.register_node("christmas_holiday_pack:ginger_1", table.copy(crop_def))

-- Stage 2
crop_def.tiles = {"christmas_holiday_pack_ginger_stage_2.png"}
crop_def.drop = {
	items = {
		{items = {"christmas_holiday_pack:ginger"}, rarity = 2},
	}
}
minetest.register_node("christmas_holiday_pack:ginger_2", table.copy(crop_def))

-- Stage 3
crop_def.tiles = {"christmas_holiday_pack_ginger_stage_3.png"}
crop_def.groups.growing = 0
crop_def.drop = {
	items = {
		{items = {"christmas_holiday_pack:ginger"}, rarity = 1},
		{items = {"christmas_holiday_pack:ginger"}, rarity = 1},
		{items = {"christmas_holiday_pack:ginger"}, rarity = 2},
	}
}
minetest.register_node("christmas_holiday_pack:ginger_3", table.copy(crop_def))

-- Add to Registered Plants
farming.registered_plants["christmas_holiday_pack:ginger"] = {
	crop = "christmas_holiday_pack:ginger",
	seed = "christmas_holiday_pack:ginger",
	minlight = 13,
	maxlight = 15,
	steps = 4,
}

repo_name: korkut/MeseCraft

license: mit


code:
Huge Christmas Content Pack by FreeGamers.org

Includes:
- 8 colored ornaments
- 5 christmas paintings.
- Candy Cane Armor
- Candy Cane, Ginger, and Frosting Blocks.
- Edibles: peppermint, candy canes, gingerbread, cookies, drinks.
- Lootchests
- Presents that gives random christmas items.
- Other decorative christmas nodes like mistletoe, reef, garland, tinsel, and a star.
- Costumes for christmas.
- 2 new seasonal crops.
- A christmas bell that rings every hour.

Optional dependencies:
Recommends: holiday_lights by FreeGamers.org


code:
local path = minetest.get_modpath("christmas_holiday_pack")

-- Initialize our namespace.
christmas_holiday_pack = {}

-- Do these submodules.
dofile(path .. "/bell.lua")
dofile(path .. "/crafts.lua")
dofile(path .. "/craftitems.lua")
dofile(path .. "/nodes.lua")
dofile(path .. "/paintings.lua")
dofile(path .. "/presents_functions.lua")
dofile(path .. "/presents_items.lua")
dofile(path .. "/stocking.lua")
dofile(path .. "/tools.lua")

-- If the "3d_armor" mod is present, Candy Cane armor is registered.
if minetest.get_modpath("3d_armor") then
        dofile(path .. "/armor.lua")
	dofile(path .. "/costumes.lua")
end

-- If the farming_redo mod is present, we add some crops.
if minetest.get_modpath("farming") then
        dofile(path .. "/crops.lua")
end

-- If the mobs_npc mod is present (assumes mobs_redo is installed) we run mobs.
if minetest.get_modpath("mobs_npc") then
	dofile(path .. "/mobs/candy_cane_man.lua")
	dofile(path .. "/mobs/christmas_tree_man.lua")
	dofile(path .. "/mobs/crampus_claus.lua")
	dofile(path .. "/mobs/gingerbread_man.lua")
	dofile(path .. "/mobs/mrs_claus.lua")
        dofile(path .. "/mobs/reindeer.lua")
        dofile(path .. "/mobs/santa_claus.lua")
        dofile(path .. "/mobs/zombie_elf.lua")
end

-- FINALIZE
-- lootchest item table
-- goodie bag item table
-- stocking item table

-- Christmas records had to be moved to the gramophone mod due to its global functions and modpath requirements.


code:
-- Candy Cane Man by FreeGamers.org

-- REGISTER CANDY CANE MAN
mobs:register_mob("christmas_holiday_pack:candy_cane_man", {
	type = "monster",
	passive = false,
	attack_type = "dogfight",
	reach = 2,
	damage = 12,
	hp_min = 20,
	hp_max = 20,
	armor = 50,
        collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
        visual = "mesh",
        mesh = "mobs_character.b3d",
        textures = {
                {"christmas_holiday_pack_candy_cane_man.png"},
        },
	makes_footstep_sound = true,
	sounds = {
		random = "mobs_creatures_stone_man_random",
		damage = "default_break_glass",
		jump = "default_glass_footstep",
		death = "default_break_glass",
	},
        blood_texture = "christmas_holiday_pack_candy_cane_block.png",
	walk_velocity = 1,
	run_velocity = 2,
	jump_height = 1,
	stepheight = 1.1,
	floats = 0,
	view_range = 12,
	drops = {
		{name = "christmas_holiday_pack:candy_cane_block", chance = 5, min = 0, max = 2},
	},
	water_damage = 0,
	lava_damage = 5,
	light_damage = 0,
	suffocation = false,
	knock_back = true,
        animation = {
                speed_normal = 30,
                speed_run = 30,
                stand_start = 0,
                stand_end = 79,
                walk_start = 168,
                walk_end = 187,
                run_start = 168,
                run_end = 187,
                punch_start = 200,
                punch_end = 219,
        },
	immune_to = {
		{"default:pick_wood", 0}, -- wooden pick doesnt hurt diamond man
		{"default:pick_stone", 4}, -- picks deal more damage to diamond man.
		{"default:pick_bronze", 5},
		{"default:pick_steel", 5},
		{"default:pick_mese", 6},
		{"default:pick_diamond", 7},
	},
    on_die = function(self, pos) -- on die, spawn particles.
        minetest.add_particlespawner({
            amount = 100,
            time = 0.1,
            minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
            maxpos = {x=pos.x+1, y=pos.y+1, z=pos.z+1},
            minvel = {x=-0, y=-0, z=-0},
            maxvel = {x=1, y=1, z=1},
            minacc = {x=-0.5,y=5,z=-0.5},
            maxacc = {x=0.5,y=5,z=0.5},
            minexptime = 0.1,
            maxexptime = 1,
            minsize = 1,
            maxsize = 2,
            collisiondetection = false,
            texture="christmas_holiday_pack_candy_cane_block.png"
        })
        self.object:remove()
	end,
-- Remove the mob if it's not December.
    do_custom = function(self)
                local date = os.date("*t")
                if not (date.month == 12) then
                               self.object:remove()
                end
    end,
})

-- Register Spawn Egg
mobs:register_egg("christmas_holiday_pack:candy_cane_man", "Candy Cane Man Spawn Egg", "christmas_holiday_pack_candy_cane_block.png", 1)

-- Spawning Parameters
mobs:spawn_specific("christmas_holiday_pack:candy_cane_man", {"default:snowblock", "default:dirt_with_snow", "default:snow"}, {"air"}, 0, 7, 480, 5000, 1, -9500, -6500)


code:
-- Candy Cane Man by FreeGamers.org

-- REGISTER CANDY CANE MAN
mobs:register_mob("christmas_holiday_pack:christmas_tree_man", {
	type = "monster",
	passive = false,
	attack_type = "dogfight",
	reach = 2,
	damage = 15,
	hp_min = 30,
	hp_max = 30,
	armor = 100,
        collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
        visual = "mesh",
        mesh = "mobs_character.b3d",
        textures = {
                {"christmas_holiday_pack_christmas_tree_man.png"},
        },
	makes_footstep_sound = true,
        sounds = {
                random = "mobs_creatures_dirt_man_random",
                attack = "default_dig_snappy",
                damage = "default_dig_choppy",
                death = "default_place_node_hard",
                jump = "default_wood_footstep",
        },
        blood_texture = "default_pine_needles.png",
	walk_velocity = 1,
	run_velocity = 2,
	jump_height = 1,
	stepheight = 1.1,
	floats = 0,
	view_range = 12,
	drops = {
		{name = "default:pine_needles", chance = 1, min = 0, max = 3},
		{name = "christmas_holiday_pack:christmas_star", chance = 10, min = 0, max = 1},
		{name = "default:pine_tree", chance = 2, min = 0, max = 2},
		{name = "christmas_holiday_pack:present_06", chance = 5, min = 0, max = 2},
		{name = "christmas_holiday_pack:present_07", chance = 5, min = 0, max = 2},
	},
	water_damage = 0,
	lava_damage = 5,
	light_damage = 0,
	suffocation = false,
	knock_back = true,
        animation = {
                speed_normal = 30,
                speed_run = 30,
                stand_start = 0,
                stand_end = 79,
                walk_start = 168,
                walk_end = 187,
                run_start = 168,
                run_end = 187,
                punch_start = 200,
                punch_end = 219,
        },
	immune_to = {
		{"default:axe_wood", 0}, -- wooden axe doesnt hurt christmas tree man
		{"default:axe_stone", 4}, -- axes deal more damage to christmas tree man.
		{"default:axe_bronze", 5},
		{"default:axe_steel", 5},
		{"default:axe_mese", 6},
		{"default:axe_diamond", 7},
	},
    on_die = function(self, pos) -- on die, spawn particles.
        minetest.add_particlespawner({
            amount = 100,
            time = 0.1,
            minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
            maxpos = {x=pos.x+1, y=pos.y+1, z=pos.z+1},
            minvel = {x=-0, y=-0, z=-0},
            maxvel = {x=1, y=1, z=1},
            minacc = {x=-0.5,y=5,z=-0.5},
            maxacc = {x=0.5,y=5,z=0.5},
            minexptime = 0.1,
            maxexptime = 1,
            minsize = 1,
            maxsize = 2,
            collisiondetection = false,
            texture="default_pine_needles.png"
        })
        self.object:remove()
    end,
-- Remove the mob if it's not December.
    do_custom = function(self)
                local date = os.date("*t")
                if not (date.month == 12) then
                               self.object:remove()
                end
    end,
})

-- Register Spawn Egg
mobs:register_egg("christmas_holiday_pack:christmas_tree_man", "Christmas Tree Man Spawn Egg", "default_pine_needles.png", 1)

-- Spawning Parameters
mobs:spawn_specific("christmas_holiday_pack:christmas_tree_man", {"default:snowblock", "default:dirt_with_snow", "default:snow"}, {"air"}, 0, 7, 480, 5000, 1, -9500, -6500)


code:
mobs:register_mob('christmas_holiday_pack:crampus_claus', {
	type = "monster",
	passive = false,
	attack_type = "dogfight",
	reach = 2,
	damage = 12,
	hp_min = 30,
	hp_max = 30,
	armor = 50,
	knock_back = true,
        collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
        visual = "mesh",
        mesh = "mobs_character.b3d",
        textures = {
                {"christmas_holiday_pack_crampus_claus.png"},
        },
	blood_texture = "mobs_blood.png",
	makes_footstep_sound = true,
	sounds = {
	             distance = "16",
--	             war_cry = "mobs_creatures_bogeyman_warcry",
	             random = "mobs_creatures_bogeyman_random",
	             attack = "mobs_creatures_bogeyman_attack",
	             damage = "mobs_creatures_bogeyman_damage",
	             death = "mobs_creatures_bogeyman_death",
	},
	walk_velocity = 1,
	run_velocity = 2.75,
	jump = true,
	floats = true,
	suffocation = true,
	view_range = 16,
	drops = {
	{name = "mobs_creatures:rotten_flesh", chance = 1, min = 0, max = 1},
	{name = "mobs_creatures:bone", chance = 2, min = 0, max = 1},
	{name = "default:gold_ingot", chance = 8, min = 1, max = 1},
	},
	lava_damage = 5,
	water_damage = 2,
	light_damage = 5,
	fall_damage = 2,
        animation = {
                speed_normal = 30,
                speed_run = 30,
                stand_start = 0,
                stand_end = 79,
                walk_start = 168,
                walk_end = 187,
                run_start = 168,
                run_end = 187,
                punch_start = 200,
                punch_end = 219,
        },
-- Remove the mob if it's not December.
    do_custom = function(self)
                local date = os.date("*t")
                if not (date.month == 12) then
                               self.object:remove()
                end
    end,
})

--Spawn Eggs
mobs:register_egg("christmas_holiday_pack:crampus_claus", "Crampus Claus Spawn Egg", "wool_brown.png", 1)

--Spawn Functions
mobs:spawn_specific("christmas_holiday_pack:crampus_claus", {"default:dirt_with_snow","default:snow","default:ice"}, {"air"}, 0, 7, 480, 1000, 2, -500 ,100)


code:
-- Gingerbread Man by FreeGamers.org
-- Register mob with Mobs API

mobs:register_mob("christmas_holiday_pack:gingerbread_man", {
	type = "monster",
	passive = false,
	attack_type = "dogfight",
	reach = 2,
	damage = 4,
	hp_min = 3,
	hp_max = 27,
	armor = 100,
	collisionbox = {-0.4, -1, -0.4, 0.4, 0.8, 0.4},
	visual = "mesh",
        mesh = "mobs_character.b3d",
	textures = {
		{"christmas_holiday_pack_gingerbread_man.png"},
	},
	blood_texture = "christmas_holiday_pack_gingerbread_block.png",
	makes_footstep_sound = true,
	sounds = {
		random = "mobs_creatures_dirt_man_random",
		damage = "default_dirt_footstep",
		attack = "default_dirt_footstep",
		jump = "default_dirt_footstep",
		death = "default_dirt_footstep",
	},
	view_range = 15,
	walk_velocity = 1,
	run_velocity = 3,
	jump = true,
	drops = {
		{name = "christmas_holiday_pack:gingerbread_block", chance = 1, min = 1, max = 2},
		{name = "christmas_holiday_pack:frosting_block", chance = 2, min = 1, max = 2},
		{name = "christmas_holiday_pack:gingerbread_cookie", chance = 2, min = 1, max = 3},
		{name = "christmas_holiday_pack:present_06", chance = 5, min = 1, max = 2},
		{name = "christmas_holiday_pack:present_07", chance = 5, min = 1, max = 2},
	},
	water_damage = 1,
	lava_damage = 5,
	light_damage = 3,
	fear_height = 4,
        animation = {
                speed_normal = 30,
                speed_run = 30,
                stand_start = 0,
                stand_end = 79,
                walk_start = 168,
                walk_end = 187,
                run_start = 168,
                run_end = 187,
                punch_start = 200,
                punch_end = 219,
        },
        immune_to = {
                {"default:sword_wood", 3}, -- swords deal more damage to gingerbread man.
                {"default:sword_stone", 3},
                {"default:sword_bronze", 4},
                {"default:sword_steel", 4},
                {"default:sword_mese", 5},
                {"default:sword_diamond", 7},
        },
    on_die = function(self, pos) -- on die, spawn particles.
        minetest.add_particlespawner({
            amount = 100,
            time = 0.1,
            minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
            maxpos = {x=pos.x+1, y=pos.y+1, z=pos.z+1},
            minvel = {x=-0, y=-0, z=-0},
            maxvel = {x=1, y=1, z=1},
            minacc = {x=-0.5,y=5,z=-0.5},
            maxacc = {x=0.5,y=5,z=0.5},
            minexptime = 0.1,
            maxexptime = 1,
            minsize = 1,
            maxsize = 3,
            collisiondetection = false,
            texture="christmas_holiday_pack_gingerbread_block.png"
        })
        self.object:remove()
    end,
-- Remove the mob if it's not December.
    do_custom = function(self)
                local date = os.date("*t")
                if not (date.month == 12) then
                               self.object:remove()
                end
    end,
})

-- Register Spawn Egg
mobs:register_egg("christmas_holiday_pack:gingerbread_man", "Gingerbread Man Spawn Egg", "christmas_holiday_pack_gingerbread_block.png", 1)

-- Register Spawn Parameters
mobs:spawn_specific("christmas_holiday_pack:gingerbread_man", {"default:snowblock", "default:dirt_with_snow", "default:snow", "default:ice"}, {"air"}, 0, 7, 60, 5000, 2, -500, 100, false)


code:
mobs:register_mob("christmas_holiday_pack:mrs_claus", {
		type = "npc",
		passive = false,
		damage = 5,
		reach = 2,
		attack_type = "dogfight",
		pathfinding = false,
                attacks_monsters = true,
                attack_animals = false,
                attack_npcs = false,
		nametag = "Mrs Claus",
		hp_min = 25,
		hp_max = 25,
		armor = 25,
		collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
		visual = "mesh",
		mesh = "mobs_character.b3d",
		textures = {
			{"christmas_holiday_pack_mrs_claus.png"},
		},
		makes_footstep_sound = true,
		sounds = {
--			random = "santa_random",
			attack = "christmas_holiday_pack_sleighbell",
			damage = "christmas_holiday_pack_sleighbell",
			jump = "christmas_holiday_pack_sleighbell",
--			death = "santa_random",
		},
		blood_amount = 0,
		walk_velocity = 0,
		run_velocity = 0,
		jump = false,
		suffocation = false,
		knock_back = false,
		water_damage = 0,
		lava_damage = 0,
		light_damage = 0,
		view_range = 15,
		owner = "",
		fear_height = 3,
	        animation = {
	                speed_normal = 30,
	                speed_run = 30,
	                stand_start = 0,
	                stand_end = 79,
--	                walk_start = 168,
--	                walk_end = 187,
--	                run_start = 168,
--	                run_end = 187,
	                punch_start = 200,
	                punch_end = 219,
	        },
		        on_rightclick = function(self, clicker)
            		   mobs_trader(self, clicker, entity, christmas_holiday_pack.mrs_claus)
		end,
	        on_spawn = function(self)
	                self.nametag = "Mrs Claus"
	                self.object:set_properties({
	                        nametag = self.nametag,
	                        nametag_color = "#BB2528"
	                })
	                return true -- return true so on_spawn is run once only
	        end,
		-- Remove the mob if it's not December.
		    do_custom = function(self)
				local date = os.date("*t")
				if not (date.month == 12) then
				               self.object:remove()
				end
		    end,
		on_die = function(self, pos) -- on die, spawn particles.
			        minetest.add_particlespawner({
			            amount = 100,
			            time = 0.1,
			            minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
			            maxpos = {x=pos.x+1, y=pos.y+1, z=pos.z+1},
			            minvel = {x=-0, y=-0, z=-0},
			            maxvel = {x=1, y=1, z=1},
			            minacc = {x=-0.5,y=5,z=-0.5},
			            maxacc = {x=0.5,y=5,z=0.5},
			            minexptime = 0.1,
			            maxexptime = 1,
			            minsize = 1,
			            maxsize = 3,
			            collisiondetection = false,
			            texture="christmas_holiday_pack_present_07.png"
			        })
			        self.object:remove()
	    	end,
})

-- Register Mrs Claus' Trading Table
christmas_holiday_pack.mrs_claus = {

	names = { "Mrs Claus" },
	items = {
                --{item for sale, price, chance of appearing in trader's inventory}
		{"mobs_creatures:milk_glass 1", "default:coal_lump 1", 1},
		{"mobs_creatures:milk_glass 1", "default:coal_lump 1", 1},
		{"christmas_holiday_pack:sugar_cookie 1", "default:coal_lump 1", 1},
		{"christmas_holiday_pack:sugar_cookie_bell 1", "default:coal_lump 1", 1},
		{"christmas_holiday_pack:sugar_cookie_star 1", "default:coal_lump 1", 1},
		{"christmas_holiday_pack:sugar_cookie_tree 1", "default:coal_lump 1", 1},
		{"christmas_holiday_pack:shirt_ugly_sweater 1", "default:coalblock 1", 1},
		}
	}
-- Register Spawn Eggs
mobs:register_egg("christmas_holiday_pack:mrs_claus", "Mrs Claus Spawn Egg", "wool_red.png", 1)

-- Spawns on Solid blocks -- Santa's spawning parameters.
mobs:spawn_specific("christmas_holiday_pack:mrs_claus", {"default:snow", "default:snowblock", "default:dirt_with_snow"}, {"air"}, 7, 16, 600, 500, 1, 2, 200)


code:
	mobs:register_mob("christmas_holiday_pack:reindeer" , {
		type = "animal",
		passive = false,
		attack_type = "dogfight",
                attacks_monsters = true,
                attack_animals = false,
                attack_npcs = false,
		damage = 5,
		reach = 2,
		hp_min = 20,
		hp_max = 20,
		armor = 25,
		collisionbox = {-0.35, -0.01, -0.35, 0.35, 1.2, 0.35},
		visual = "mesh",
		mesh = "reindeer.b3d",
		textures = {
			{"reindeer.png"},
		},
		makes_footstep_sound = true,
		sounds = {
			random = "reindeer_random",
			damage = "christmas_holiday_pack_sleighbell",
			jump = "christmas_holiday_pack_sleighbell",
			attack = "christmas_holiday_pack_sleighbell",
			death = "reindeer_random",
		},
		walk_velocity = 0,
		run_velocity = 0,
		jump = false,
		suffocation = false,
		knock_back = false,
		water_damage = 0,
		lava_damage = 0,
		light_damage = 0,
		animation = {
			speed_normal = 25,
			speed_normal = 25,
			speed_run = 25,
			stand_start = 0,
			stand_end = 200,
			walk_start = 149,
			walk_end = 150,
			run_start = 150,
			run_end = 170,
		},
		follow = "christmas_decor:candycane_edible",
		view_range = 15,
		fear_height = 3,
		on_rightclick = function(self, clicker)
	                mobs_trader(self, clicker, entity, christmas_holiday_pack.reindeer)
       		end,
                on_spawn = function(self)
                        self.nametag = "Santa's Reindeer"
                        self.object:set_properties({
                                nametag = self.nametag,
                                nametag_color = "#BB2528"
                	})
                        return true -- return true so on_spawn is run once only
                end,
		do_custom = function(self)
			if self.nametag == "Trader Rudolph" then
				self.textures = "reindeer_rudolph.png"
			end
			-- Remove mobs when its not Christmastime.
                        local date = os.date("*t")
                        if not (date.month == 12) then
                                        self.object:remove()
                        end
		end,
                    on_die = function(self, pos) -- on die, spawn particles.
	                minetest.add_particlespawner({
	                    amount = 100,
	                    time = 0.1,
	                    minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
	                    maxpos = {x=pos.x+1, y=pos.y+1, z=pos.z+1},
	                    minvel = {x=-0, y=-0, z=-0},
	                    maxvel = {x=1, y=1, z=1},
	                    minacc = {x=-0.5,y=5,z=-0.5},
	                    maxacc = {x=0.5,y=5,z=0.5},
	                    minexptime = 0.1,
	                    maxexptime = 1,
	                    minsize = 1,
	                    maxsize = 3,
	                    collisiondetection = false,
	                    texture="christmas_holiday_pack_present_07.png"
	                })
	                self.object:remove()
	                end,

})

-- REGISTER SPAWN EGG
	mobs:register_egg("christmas_holiday_pack:reindeer","Christmas Reindeer", "wool_brown.png", 1)

-- Reindeer's Trading Table
christmas_holiday_pack.reindeer = {

        names = { "Dasher", "Dancer", "Prancer", "Vixen", "Comet", "Cupid", "Donner", "Blitzen", "Rudolph" },
        items = {
                --{item for sale, price, chance of appearing in trader's inventory}
                {"christmas_holiday_pack:present_01 1", "default:apple 1", 1},
                {"christmas_holiday_pack:present_02 1", "default:apple 1", 1},
                {"christmas_holiday_pack:present_03 1", "default:apple 1", 1},
                {"christmas_holiday_pack:present_04 1", "farming:oat 1", 1},
                {"christmas_holiday_pack:present_05 1", "farming:oat 1", 1},
                {"christmas_holiday_pack:present_06 1", "farming:carrot 1", 1},
                {"christmas_holiday_pack:present_07 1", "farming:carrot 1", 1},
                }
        }

-- Spawns on Solid blocks -- Santa's spawning parameters.
mobs:spawn_specific("christmas_holiday_pack:reindeer", {"default:snow", "default:snowblock", "default:dirt_with_snow"}, {"air"}, 7, 16, 600, 500, 1, 2, 200)


code:
mobs:register_mob("christmas_holiday_pack:santa_claus", {
		type = "npc",
		passive = false,
		attack_type = "dogfight",
		attacks_monsters = true,
		attack_animals = false,
		attack_npcs = false,
		damage = 5,
		reach = 2,
		pathfinding = false,
		nametag = "Santa Claus",
		hp_min = 25,
		hp_max = 25,
		armor = 50,
		collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
		visual = "mesh",
		mesh = "mobs_character.b3d",
		textures = {
			{"santa.png"},
		},
		makes_footstep_sound = true,
		sounds = {
			random = "santa_random",
			attack = "christmas_holiday_pack_sleighbell",
			damage = "christmas_holiday_pack_sleighbell",
			jump = "christmas_holiday_pack_sleighbell",
			death = "santa_random",
		},
		blood_amount = 0,
		walk_velocity = 0,
		run_velocity = 0,
		jump = false,
		suffocation = false,
		knock_back = false,
		water_damage = 0,
		lava_damage = 0,
		light_damage = 0,
		view_range = 15,
		owner = "",
		fear_height = 3,
	        animation = {
	                speed_normal = 30,
	                speed_run = 30,
	                stand_start = 0,
	                stand_end = 79,
--	                walk_start = 168,
--	                walk_end = 187,
--	                run_start = 168,
--	                run_end = 187,
	                punch_start = 200,
	                punch_end = 219,
	        },
		        on_rightclick = function(self, clicker)
            		   mobs_trader(self, clicker, entity, christmas_holiday_pack.santa)
		end,
	        on_spawn = function(self)
	                self.nametag = "Santa Claus"
	                self.object:set_properties({
	                        nametag = self.nametag,
	                        nametag_color = "#BB2528"
	                })
	                return true -- return true so on_spawn is run once only
	        end,
		on_die = function(self, pos) -- on die, spawn particles.
			        minetest.add_particlespawner({
			            amount = 100,
			            time = 0.1,
			            minpos = {x=pos.x-1, y=pos.y-1, z=pos.z-1},
			            maxpos = {x=pos.x+1, y=pos.y+1, z=pos.z+1},
			            minvel = {x=-0, y=-0, z=-0},
			            maxvel = {x=1, y=1, z=1},
			            minacc = {x=-0.5,y=5,z=-0.5},
			            maxacc = {x=0.5,y=5,z=0.5},
			            minexptime = 0.1,
			            maxexptime = 1,
			            minsize = 1,
			            maxsize = 3,
			            collisiondetection = false,
			            texture="christmas_holiday_pack_present_07.png"
			        })
			        self.object:remove()
	    	end,
		-- Mob will remove itself if its not Christmas time.
	        do_custom = function(self)
			local date = os.date("*t")
			if not (date.month == 12) then
	                                self.object:remove()
	                end
	        end,
})

-- Register Santa's Trading Table
christmas_holiday_pack.santa = {

	names = { "Santa Claus" },
	items = {
                --{item for sale, price, chance of appearing in trader's inventory}
		{"christmas_holiday_pack:present_01 1", "mobs_creatures:milk_glass 1", 1},
		{"christmas_holiday_pack:present_02 1", "mobs_creatures:milk_glass 1", 1},
		{"christmas_holiday_pack:present_03 1", "mobs_creatures:milk_glass 1", 1},
		{"christmas_holiday_pack:present_04 1", "christmas_holiday_pack:sugar_cookie 1", 1},
		{"christmas_holiday_pack:present_05 1", "christmas_holiday_pack:sugar_cookie_bell 1", 1},
		{"christmas_holiday_pack:present_06 1", "christmas_holiday_pack:sugar_cookie_star 1", 1},
		{"christmas_holiday_pack:present_07 1", "christmas_holiday_pack:sugar_cookie_tree 1", 1},
		}
	}
-- Register Spawn Eggs
mobs:register_egg("christmas_holiday_pack:santa_claus", "Santa Claus Spawn Egg", "wool_red.png", 1)

-- Spawns on Solid blocks -- Santa's spawning parameters. Autoremove (do_custom) if not christmas-time.
mobs:spawn_specific("christmas_holiday_pack:santa_claus", {"default:snow", "default:snowblock", "default:dirt_with_snow"}, {"air"}, 7, 16, 600, 500, 1, 2, 200)


code:
mobs:register_mob('christmas_holiday_pack:zombie_elf', {
	type = "monster",
	passive = false,
	attack_type = "dogfight",
	reach = 2,
	damage = 4,
	hp_min = 10,
	hp_max = 20,
	armor = 125,
	knock_back = true,
        collisionbox = {-0.24,-0.75,-0.24, 0.24,0.6,0.24},
        visual = "mesh",
	visual_size = { x=0.75, y=0.75},
        mesh = "mobs_character.b3d",
        textures = {
                {"christmas_holiday_pack_zombie_elf.png"},
        },
	blood_texture = "mobs_blood.png",
	makes_footstep_sound = true,
	sounds = {
		random ="mobs_creatures_fire_imp_random",
		warcry = "mobs_creatures_fire_imp_warcry",
		attack = "christmas_holiday_pack_sleighbell",
		damage = "christmas_holiday_pack_sleighbell",
		death = "mobs_creatures_fire_imp_death",
	},
	walk_velocity = 2,
	run_velocity = 3.25,
	jump = true,
	floats = true,
	suffocation = true,
	view_range = 16,
	drops = {
	{name = "christmas_holiday_pack:present_01", chance = 2, min = 1, max = 1},
	{name = "christmas_holiday_pack:present_02", chance = 2, min = 1, max = 1},
	{name = "christmas_holiday_pack:present_03", chance = 8, min = 1, max = 1},
	{name = "christmas_holiday_pack:present_04", chance = 8, min = 1, max = 1},
	},
	lava_damage = 5,
	water_damage = 2,
	light_damage = 5,
	fall_damage = 2,
        animation = {
                speed_normal = 30,
                speed_run = 50,
                stand_start = 0,
                stand_end = 79,
                walk_start = 168,
                walk_end = 187,
                run_start = 168,
                run_end = 187,
                punch_start = 200,
                punch_end = 219,
	},
        do_custom = function(self)
                local date = os.date("*t")
                if not (date.month == 12) then
                                self.object:remove()
                end
        end,
})

--Spawn Eggs
mobs:register_egg("christmas_holiday_pack:zombie_elf", "Zombie Elf Spawn Egg", "wool_green.png", 1)

--Spawn Functions
mobs:spawn_specific("christmas_holiday_pack:zombie_elf", {"default:snow", "default:snowblock", "default:dirt_with_snow"}, {"air"}, 7, 16, 120, 500, 3, 2, 200)


code:
name = christmas_holiday_pack
description = Santa Claus is coming to town and he's bringing a sleigh full of Christmas items for Minetest.
depends = default
optional_depends = 3d_armor, farming, gramophone, holiday_lights, mobs_npc, moreblocks, toolranks


code:
-- Christmas Holiday Pack by FreeGamers.org

-- MAIN NODES
	-- Candy Cane Block
	minetest.register_node("christmas_holiday_pack:candy_cane_block", {
		description = "Candy Cane Block",
		tiles = {"christmas_holiday_pack_candy_cane_block.png", "christmas_holiday_pack_candy_cane_block.png", "christmas_holiday_pack_candy_cane_block.png", "christmas_holiday_pack_candy_cane_block.png", "christmas_holiday_pack_candy_cane_block.png^[transformFX", "christmas_holiday_pack_candy_cane_block.png^[transformFX"},
		paramtype2 = "facedir",
		groups = {snappy = 3, oddly_breakable_by_hand = 3},
		sounds = default.node_sound_glass_defaults(),
	})

	-- Green Candy Cane Block
	minetest.register_node("christmas_holiday_pack:green_candy_cane_block", {
	        description = "Green Candy Cane Block",
	        tiles = {"christmas_holiday_pack_green_candy_cane_block.png", "christmas_holiday_pack_green_candy_cane_block.png", "christmas_holiday_pack_green_candy_cane_block.png", "christmas_holiday_pack_green_candy_cane_block.png", "christmas_holiday_pack_green_candy_cane_block.png^[transformFX", "christmas_holiday_pack_green_candy_cane_block.png^[transformFX"},
	        paramtype2 = "facedir",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})

	-- Gingerbread Block
	minetest.register_node("christmas_holiday_pack:gingerbread_block", {
	        description = "Gingerbread Block",
	        tiles = {"christmas_holiday_pack_gingerbread_block.png", "christmas_holiday_pack_gingerbread_block.png", "christmas_holiday_pack_gingerbread_block.png", "christmas_holiday_pack_gingerbread_block.png", "christmas_holiday_pack_gingerbread_block.png^[transformFX", "christmas_holiday_pack_gingerbread_block.png^[transformFX"},
	        paramtype2 = "facedir",
	        groups = {snappy = 3, choppy = 2, oddly_breakable_by_hand = 2},
	        sounds = default.node_sound_wood_defaults(),
	})
	-- Frosting Block
	minetest.register_node("christmas_holiday_pack:frosting_block", {
		description = "Frosting Block",
		tiles = {"christmas_holiday_pack_frosting_block.png"},
		paramtype2 = "facedir",
		groups = {snappy = 3},
		sounds = default.node_sound_leaves_defaults(),
	})

-- StairsPlus Registrations for Candy Cane Block,  Green Candy Cane Block, Gingerbread Block, Frosting Block.
if minetest.get_modpath("moreblocks") then
        stairsplus:register_all(
	                "christmas_holiday_pack", "candy_cane_block", "christmas_holiday_pack:candy_cane_block", {
                        description = "Candy Cane Block",
                        groups = {snappy = 3, oddly_breakable_by_hand = 3},
                        tiles = {"christmas_holiday_pack_candy_cane_block.png"},
                        sounds = default.node_sound_glass_defaults(),
        })
	stairsplus:register_all(
	                "christmas_holiday_pack", "green_candy_cane_block", "christmas_holiday_pack:green_candy_cane_block", {
                        description = "Green Candy Cane Block",
                        groups = {snappy = 3, oddly_breakable_by_hand = 3},
                        tiles = {"christmas_holiday_pack_green_candy_cane_block.png"},
                        sounds = default.node_sound_glass_defaults(),
        })
	stairsplus:register_all(
                        "christmas_holiday_pack", "gingerbread_block", "christmas_holiday_pack:gingerbread_block", {
                        description = "Gingerbread Block",
                        groups = {snappy = 3, choppy = 2, oddly_breakable_by_hand = 2},
                        tiles = {"christmas_holiday_pack_gingerbread_block.png"},
                        sounds = default.node_sound_wood_defaults(),
        })
        stairsplus:register_all(
          		"christmas_holiday_pack", "frosting_block", "christmas_holiday_pack:frosting_block", {
                        description = "Frosting",
                        groups = {snappy = 3},
                        tiles = {"christmas_holiday_pack_frosting_block.png"},
                        sounds = default.node_sound_stone_defaults(),
        })
end

-- DECORATIVE NODES

	-- Mistletoe
	minetest.register_node("christmas_holiday_pack:mistletoe", {
	        description = "Mistletoe",
	        tiles = {"christmas_holiday_pack_mistletoe.png"},
	        drawtype = "plantlike",
	        walkable = false,
	        sunlight_propagates = true,
	        use_texture_alpha = "clip",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_leaves_defaults(),
	})

	-- Christmas Reef
	minetest.register_node("christmas_holiday_pack:reef", {
	        description = "Christmas Reef",
	        tiles = {"christmas_holiday_pack_christmas_reef.png"},
	        inventory_image = "christmas_holiday_pack_christmas_reef.png",
	        wield_image = "christmas_holiday_pack_christmas_reef.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_leaves_defaults(),
	})

	-- Icicles
	minetest.register_node("christmas_holiday_pack:icicles", {
	        description = "Icicles",
	        tiles = {"christmas_holiday_pack_icicles.png"},
	        inventory_image = "christmas_holiday_pack_icicles.png",
	        wield_image = "christmas_holiday_pack_icicles.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3},
	        sounds = default.node_sound_glass_defaults(),
	})

	-- Christmas Tree Star
	minetest.register_node("christmas_holiday_pack:christmas_star", {
	        description = "Christmas Star",
	        tiles = {"christmas_holiday_pack_christmas_star.png"},
	        drawtype = "plantlike",
	        walkable = false,
	        sunlight_propagates = true,
	        use_texture_alpha = "clip",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        light_source = 8,
	        sounds = default.node_sound_metal_defaults(),
	})
	-- Garland
	minetest.register_node("christmas_holiday_pack:garland", {
		description = "Garland",
		tiles = {"garland_green.png"},
		inventory_image = "garland_green.png",
		wield_image = "garland_green.png",
		sunlight_propagates = true,
		walkable = false,
		climbable = false,
		is_ground_content = false,
		selection_box = {
			type = "wallmounted",
		},
		legacy_wallmounted = true,
		use_texture_alpha = "clip",
		drawtype = "signlike",
		paramtype = "light",
		paramtype2 = "wallmounted",
		groups = {snappy = 3},
		sounds = default.node_sound_leaves_defaults(),
	})
	-- Festive Garland
	minetest.register_node("christmas_holiday_pack:festive_garland", {
		description = "Festive Garland",
		tiles = {"garland.png"},
		inventory_image = "garland.png",
		wield_image = "garland.png",
		sunlight_propagates = true,
		walkable = false,
		climbable = false,
		is_ground_content = false,
		selection_box = {
			type = "wallmounted",
		},
		legacy_wallmounted = true,
		use_texture_alpha = "clip",
		drawtype = "signlike",
		paramtype = "light",
		paramtype2 = "wallmounted",
		groups = {snappy = 3},
		sounds = default.node_sound_leaves_defaults(),
	})
	-- Festive Garland with Lights
	minetest.register_node("christmas_holiday_pack:festive_garland_lights", {
		description = "Festive Garland with Lights",
		tiles = {
			{
				image = "garland_lights.png",
				backface_culling = false,
				animation = {
					type = "vertical_frames",
					aspect_w = 64,
					aspect_h = 64,
					length = 16
				},
			}
		},
		inventory_image = "inv_garland_lights.png",
		wield_image = "inv_garland_lights.png",
		sunlight_propagates = true,
		walkable = false,
		climbable = false,
		is_ground_content = false,
		selection_box = {
			type = "wallmounted",
		},
		legacy_wallmounted = true,
		use_texture_alpha = "clip",
		drawtype = "signlike",
		paramtype = "light",
		light_source = 8,
		paramtype2 = "wallmounted",
		groups = {snappy = 3},
		sounds = default.node_sound_leaves_defaults(),
	})
        -- Red Garland
        minetest.register_node("christmas_holiday_pack:garland_red", {
                description = "Red Garland",
                tiles = {"garland_red.png"},
                inventory_image = "garland_red.png",
                wield_image = "garland_red.png",
                sunlight_propagates = true,
                walkable = false,
                climbable = false,
                is_ground_content = false,
                selection_box = {
                        type = "wallmounted",
                },
                legacy_wallmounted = true,
                use_texture_alpha = "clip",
                drawtype = "signlike",
                paramtype = "light",
                paramtype2 = "wallmounted",
                groups = {snappy = 3},
                sounds = default.node_sound_leaves_defaults(),
        })
        -- Yellow Garland
        minetest.register_node("christmas_holiday_pack:garland_yellow", {
                description = "Yellow Garland",
                tiles = {"garland_yellow.png"},
                inventory_image = "garland_yellow.png",
                wield_image = "garland_yellow.png",
                sunlight_propagates = true,
                walkable = false,
                climbable = false,
                is_ground_content = false,
                selection_box = {
                        type = "wallmounted",
                },
                legacy_wallmounted = true,
                use_texture_alpha = "clip",
                drawtype = "signlike",
                paramtype = "light",
                paramtype2 = "wallmounted",
                groups = {snappy = 3},
                sounds = default.node_sound_leaves_defaults(),
        })
        -- White Garland
        minetest.register_node("christmas_holiday_pack:garland_white", {
                description = "White Garland",
                tiles = {"garland_white.png"},
                inventory_image = "garland_white.png",
                wield_image = "garland_white.png",
                sunlight_propagates = true,
                walkable = false,
                climbable = false,
                is_ground_content = false,
                selection_box = {
                        type = "wallmounted",
                },
                legacy_wallmounted = true,
                use_texture_alpha = "clip",
                drawtype = "signlike",
                paramtype = "light",
                paramtype2 = "wallmounted",
                groups = {snappy = 3},
                sounds = default.node_sound_leaves_defaults(),
        })

	-- ORNAMENTS
	        --
	-- White Ornament
	minetest.register_node("christmas_holiday_pack:ornament_white", {
	        description = "White Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_white.png"},
	        inventory_image = "christmas_holiday_pack_ornament_white.png",
	        wield_image = "christmas_holiday_pack_ornament_white.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Yellow Ornament
	minetest.register_node("christmas_holiday_pack:ornament_yellow", {
	        description = "Yellow Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_yellow.png"},
	        inventory_image = "christmas_holiday_pack_ornament_yellow.png",
	        wield_image = "christmas_holiday_pack_ornament_yellow.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Red Ornament
	minetest.register_node("christmas_holiday_pack:ornament_red", {
	        description = "Red Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_red.png"},
	        inventory_image = "christmas_holiday_pack_ornament_red.png",
	        wield_image = "christmas_holiday_pack_ornament_red.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Green Ornament
	minetest.register_node("christmas_holiday_pack:ornament_green", {
	        description = "Green Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_green.png"},
	        inventory_image = "christmas_holiday_pack_ornament_green.png",
	        wield_image = "christmas_holiday_pack_ornament_green.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Blue Ornament
	minetest.register_node("christmas_holiday_pack:ornament_blue", {
	        description = "Blue Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_blue.png"},
	        inventory_image = "christmas_holiday_pack_ornament_blue.png",
	        wield_image = "christmas_holiday_pack_ornament_blue.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Orange Ornament
	minetest.register_node("christmas_holiday_pack:ornament_orange", {
	        description = "Orange Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_orange.png"},
	        inventory_image = "christmas_holiday_pack_ornament_orange.png",
	        wield_image = "christmas_holiday_pack_ornament_orange.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Purple Ornament
	minetest.register_node("christmas_holiday_pack:ornament_purple", {
	        description = "Purple Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_purple.png"},
	        inventory_image = "christmas_holiday_pack_ornament_purple.png",
	        wield_image = "christmas_holiday_pack_ornament_purple.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})
	-- Pink Ornament
	minetest.register_node("christmas_holiday_pack:ornament_pink", {
	        description = "Pink Christmas Ornament",
	        tiles = {"christmas_holiday_pack_ornament_pink.png"},
	        inventory_image = "christmas_holiday_pack_ornament_pink.png",
	        wield_image = "christmas_holiday_pack_ornament_pink.png",
	        sunlight_propagates = true,
	        walkable = false,
	        climbable = false,
	        is_ground_content = false,
	        selection_box = {
	                type = "wallmounted",
	        },
	        legacy_wallmounted = true,
	        use_texture_alpha = "clip",
	        drawtype = "signlike",
	        paramtype = "light",
	        paramtype2 = "wallmounted",
	        groups = {snappy = 3, oddly_breakable_by_hand = 3},
	        sounds = default.node_sound_glass_defaults(),
	})


code:
-- Christmas Tree Painting (64x48)
minetest.register_node("christmas_holiday_pack:painting_01", {
                description = "Christmas Tree Painting",
                drawtype = "nodebox",
                tiles = {"christmas_holiday_pack_painting_01.png"},
                inventory_image = "christmas_holiday_pack_painting_01.png",
                wield_image = "christmas_holiday_pack_painting_01.png",
                paramtype = "light",
                paramtype2 = "wallmounted",
                sunlight_propagates = true,
                walkable = false,
                node_box = {
                        type = "wallmounted",
			-- Ceiling
                        wall_top    = {-0.5, 0.4375, -0.375, 0.5, 0.5, 0.375},
			-- Floor
                        wall_bottom = {-0.5, -0.5, -0.375, 0.5, -0.4375, 0.375},
			-- Wall
                        wall_side   = {-0.5, -0.375, -0.5, -0.4375, 0.375, 0.5},
                },
                groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
                sounds = default.node_sound_wood_defaults(),
        })

-- Santa Christmas Painting (64x64)
minetest.register_node("christmas_holiday_pack:painting_02", {
                description = "Santa Claus Painting",
                drawtype = "nodebox",
                tiles = {"christmas_holiday_pack_painting_02.png"},
                inventory_image = "christmas_holiday_pack_painting_02.png",
                wield_image = "christmas_holiday_pack_painting_02.png",
                paramtype = "light",
                paramtype2 = "wallmounted",
                sunlight_propagates = true,
                walkable = false,
                node_box = {
                        type = "wallmounted",
			-- Ceiling
                        wall_top    = {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5},
			-- Floor
                        wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
			-- Wall
                        wall_side   = {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5},
                },
                groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
                sounds = default.node_sound_wood_defaults(),
        })

-- Snowman Christmas Painting (64x64)
minetest.register_node("christmas_holiday_pack:painting_03", {
                description = "Snowman Painting",
                drawtype = "nodebox",
                tiles = {"christmas_holiday_pack_painting_03.png"},
                inventory_image = "christmas_holiday_pack_painting_03.png",
                wield_image = "christmas_holiday_pack_painting_03.png",
                paramtype = "light",
                paramtype2 = "wallmounted",
                sunlight_propagates = true,
                walkable = false,
                node_box = {
                        type = "wallmounted",
			-- Ceiling
                        wall_top    = {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5},
			-- Floor
                        wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
			-- Wall
                        wall_side   = {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5},
                },
                groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
                sounds = default.node_sound_wood_defaults(),
        })
-- Christmas Tree Painting (64x32)
minetest.register_node("christmas_holiday_pack:painting_04", {
                description = "Christmas Cabin Landscape Painting",
                drawtype = "nodebox",
                tiles = {"christmas_holiday_pack_painting_04.png"},
                inventory_image = "christmas_holiday_pack_painting_04.png",
                wield_image = "christmas_holiday_pack_painting_04.png",
                paramtype = "light",
                paramtype2 = "wallmounted",
                sunlight_propagates = true,
                walkable = false,
                node_box = {
                        type = "wallmounted",
                        -- Ceiling
                        wall_top    = {-0.5, 0.4375, -0.25, 0.5, 0.5, 0.25},
                        -- Floor
                        wall_bottom = {-0.5, -0.5, -0.25, 0.5, -0.4375, 0.25},
                        -- Wall
                        wall_side   = {-0.5, -0.25, -0.5, -0.4375, 0.25, 0.5},
                },
                groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
                sounds = default.node_sound_wood_defaults(),
        })

-- Mountainous Winter Landscape Painting (64x32)
minetest.register_node("christmas_holiday_pack:painting_05", {
                description = "Mountainous Winter Landscape Painting",
                drawtype = "nodebox",
                tiles = {"christmas_holiday_pack_painting_05.png"},
                inventory_image = "christmas_holiday_pack_painting_05.png",
                wield_image = "christmas_holiday_pack_painting_05.png",
                paramtype = "light",
                paramtype2 = "wallmounted",
                sunlight_propagates = true,
                walkable = false,
                node_box = {
                        type = "wallmounted",
                        -- Ceiling
                        wall_top    = {-0.5, 0.4375, -0.25, 0.5, 0.5, 0.25},
                        -- Floor
                        wall_bottom = {-0.5, -0.5, -0.25, 0.5, -0.4375, 0.25},
                        -- Wall
                        wall_side   = {-0.5, -0.25, -0.5, -0.4375, 0.25, 0.5},
                },
                groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
                sounds = default.node_sound_wood_defaults(),
        })

-- Winter Horseback Riding Painting (64x48)
minetest.register_node("christmas_holiday_pack:painting_06", {
                description = "Winter Horseback Riding Painting",
                drawtype = "nodebox",
                tiles = {"christmas_holiday_pack_painting_06.png"},
                inventory_image = "christmas_holiday_pack_painting_06.png",
                wield_image = "christmas_holiday_pack_painting_06.png",
                paramtype = "light",
                paramtype2 = "wallmounted",
                sunlight_propagates = true,
                walkable = false,
                node_box = {
                        type = "wallmounted",
                        -- Ceiling
                        wall_top    = {-0.5, 0.4375, -0.375, 0.5, 0.5, 0.375},
                        -- Floor
                        wall_bottom = {-0.5, -0.5, -0.375, 0.5, -0.4375, 0.375},
                        -- Wall
                        wall_side   = {-0.5, -0.375, -0.5, -0.4375, 0.375, 0.5},
                },
                groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
                sounds = default.node_sound_wood_defaults(),
        })


code:
-- Christmas Present Goodie Bags
-- Code primarily from ff_goodie_bags, simplified and fixed sound clip pos.
-- max 3 items per open, max 1 items per stack, each item has 1 in 5 chance of coming from exclusive item pool.
-- define namespace.
christmas_holiday_pack.open_present = function (color)
    	local on_use = function(itemstack, user, pointed_thing)
    		-- Safety check to ensure at least 1 item exists to be given
    		if christmas_holiday_pack["christmas_common_item_pool"][1] == nil then
    			return itemstack
    		end

    		-- Get player inv
    		local player_name = user:get_player_name()
    		local player = minetest.get_player_by_name(player_name)
    		local inv = player:get_inventory()
    		local pos = player:getpos()

    		-- Select random loot
    		local item_drops = {}
    		local num_of_unique_drops = math.random(3)

    		local i

    		for i = 1, num_of_unique_drops, 1 do
    			local stack_num = math.random(1)
    			local color_exclusive_chance = math.random(5)
    			if color_exclusive_chance == 1 and christmas_holiday_pack[color .. "_item_pool"][1] ~= nil then
    				table.insert(item_drops, christmas_holiday_pack[color .. "_item_pool"][math.random(#christmas_holiday_pack[color .. "_item_pool"])] .. " " .. stack_num)
    			else
    				table.insert(item_drops, christmas_holiday_pack["christmas_common_item_pool"][math.random(#christmas_holiday_pack["christmas_common_item_pool"])] .. " " .. stack_num)
    			end
    		end

    		-- Give the loot to the player
    		for _,v in pairs(item_drops) do
    			local leftover = inv:add_item("main", v)
    			if leftover:get_count() > 0 then
    				local droppos = pos
    				local xposrandom = math.random() * math.random(-0.9, 0.9)
    				local zposrandom = math.random() * math.random(-0.9, 0.9)
    				droppos.x = droppos.x + xposrandom
    				droppos.z = droppos.z + zposrandom
    				minetest.add_item(droppos, leftover)
    			end
    		end

    		-- Play the sound
    		minetest.sound_play("christmas_holiday_pack_sleighbell", {pos=pos, max_hear_distance = 2, gain = 1.0,})

    		-- Remove one goodie bag from the itemstack
    		itemstack:take_item()
    		return itemstack
    	end
    	return on_use
    end


code:
-- Christmas Presents by FreeGamers.org
-- Description: Adds Christmas presents that give random items.
-- Note: Make sure this runs after presents_functions.lua
-- Instructions: Uses item tables to determine what is common, rare, and special.
-- farming, pie, dye, default, mobs_creatures, holiday lights,

christmas_holiday_pack.christmas_common_item_pool = {}
christmas_holiday_pack.christmas_uncommon_item_pool = {}
christmas_holiday_pack.christmas_special_item_pool = {}

-- Common Item Pool
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:coal_lump")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:pine_needles")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:pine_sapling")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:pine_wood")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "dye:red")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "dye:green")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:candy_cane")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:peppermint_candies")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:green_peppermint_candies")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:sugar_cookie")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:eggnog_glass")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:hot_chocolate_glass")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "mobs_creatures:milk_glass")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:candy_cane_block")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:gingerbread_block")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:icicles")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:festive_garland")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:festive_garland_lights")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:garland_red")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:garland_yellow")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:garland_white")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_white")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_yellow")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_red")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_green")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_blue")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_orange")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_purple")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "christmas_holiday_pack:ornament_pink")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:gold_ingot")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:blueberries")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:ice")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "default:snow")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "holiday_lights:lights_icy")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "holiday_lights:lights_festive")
	table.insert(christmas_holiday_pack.christmas_common_item_pool, "holiday_lights:lights_rainbow")

-- Uncommon Item Pool
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "default:coal")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "default:pine_tree")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "farming:chocolate_dark")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "pie:pie_0")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "farming:porridge")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:green_candy_cane")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:gingerbread")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:gingerbread_cookie")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:sugar_cookie_star")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:sugar_cookie_tree")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:sugar_cookie_bell")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "mobs_creatures:milk_bucket")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:peppermint_seeds")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:ginger")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:green_candy_cane_block")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:frosting_block")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:mistletoe")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:reef")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:christmas_star")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:painting_03")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "christmas_holiday_pack:painting_05")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "farming:blueberry_pie")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "gramophone:vinyl_disc10")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "gramophone:vinyl_disc11")
        table.insert(christmas_holiday_pack.christmas_uncommon_item_pool, "gnu:moognu_rainbow")

-- Special Item Pool
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:christmas_bell")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:helmet_cane")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:chestplate_cane")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:leggings_cane")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:boots_cane")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:shield_cane")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:mask_green_santa_hat")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:mask_santa_hat")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:mask_red_poof_ball_hat")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:suit_elf")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:suit_orange_parka")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:suit_santa")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:suit_tree")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:shirt_ugly_sweater")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:painting_01")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:painting_02")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:painting_04")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:painting_06")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:stocking")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:green_stocking")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:candy_cane_pickaxe")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:candy_cane_axe")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "christmas_holiday_pack:candy_cane_sword")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "gramophone:vinyl_disc12")
        table.insert(christmas_holiday_pack.christmas_special_item_pool, "gramophone:vinyl_disc13")

-- Register Presents (3 tiers: 3 commons, 2 uncommon, 2 special)

	-- Common Tier
	minetest.register_craftitem("christmas_holiday_pack:present_01", {
		description = "" ..core.colorize("#35cdff","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
		inventory_image = "christmas_holiday_pack_present_01.png",
		on_use = christmas_holiday_pack.open_present("christmas_common"),
	})

	minetest.register_craftitem("christmas_holiday_pack:present_02", {
		description = "" ..core.colorize("#35cdff","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
	        inventory_image = "christmas_holiday_pack_present_02.png",
	        on_use = christmas_holiday_pack.open_present("christmas_common"),
	})

	minetest.register_craftitem("christmas_holiday_pack:present_03", {
		description = "" ..core.colorize("#35cdff","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
	        inventory_image = "christmas_holiday_pack_present_03.png",
	        on_use = christmas_holiday_pack.open_present("christmas_common"),
	})

	-- Uncommon Tier

	minetest.register_craftitem("christmas_holiday_pack:present_04", {
                description = "" ..core.colorize("#146b3a","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
	        inventory_image = "christmas_holiday_pack_present_04.png",
	        on_use = christmas_holiday_pack.open_present("christmas_uncommon"),
	})

        minetest.register_craftitem("christmas_holiday_pack:present_05", {
                description = "" ..core.colorize("#146b3a","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
                inventory_image = "christmas_holiday_pack_present_05.png",
                on_use = christmas_holiday_pack.open_present("christmas_uncommon"),
        })

	-- Special Tier

        minetest.register_craftitem("christmas_holiday_pack:present_06", {
                description = "" ..core.colorize("#bb2528","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
                inventory_image = "christmas_holiday_pack_present_06.png",
                on_use = christmas_holiday_pack.open_present("christmas_special"),
        })

        minetest.register_craftitem("christmas_holiday_pack:present_07", {
                description = "" ..core.colorize("#bb2528","Christmas Present\n") ..core.colorize("#FFFFFF", "Wonder what's inside?"),
                inventory_image = "christmas_holiday_pack_present_07.png",
                on_use = christmas_holiday_pack.open_present("christmas_special"),
        })


code:
-- Stocking Stuffing Code.
-- Primarily based on GreenXenith's code from christmas_decor mod. Minor changes such as items and nodetype.
local stocking = {}
local stuffer = {}
stuffer.stuffers = {}

function stuffer.register_stuff(name, count)
	if count == nil then count = 1 end
	local stuff = {
		name = name,
		count = count,
		metadata = "",
	}
	table.insert(stuffer.stuffers, stuff)
end

function stuffer.select_stuffers(count)
	local p_stuffers = {}
	for i=1,#stuffer.stuffers do
		table.insert(p_stuffers, stuffer.stuffers[i])
	end
	local itemstacks = {}
	for i=1,#stuffer.stuffers do
		itemstacks[i] = stuffer.stuff_to_itemstack(stuffer.stuffers[i])
	end
	return itemstacks
end

function stuffer.stuff_to_itemstack(stuff)
	local itemstack = {}
	itemstack.name = stuff.name
	itemstack.count = stuffer.determine_count(stuff)
	itemstack.metadata = stuff.metadata

	return ItemStack(itemstack)
end

function stuffer.determine_count(stuff)
	if(type(stuff.count)=="number") then
		return stuff.count
	end
end

-- REGISTER STUFFERS BELOW HERE
--stuffer.register_stuff("modname:nodename", amount)
stuffer.register_stuff("default:gold_ingot", 25)
stuffer.register_stuff("christmas_holiday_pack:candy_cane", 25)
stuffer.register_stuff("christmas_holiday_pack:candy_cane_pickaxe", 1)
stuffer.register_stuff("christmas_holiday_pack:candy_cane_axe", 1)
stuffer.register_stuff("christmas_holiday_pack:candy_cane_sword", 1)
stuffer.register_stuff("christmas_holiday_pack:helmet_cane", 1)
stuffer.register_stuff("christmas_holiday_pack:chestplate_cane", 1)
stuffer.register_stuff("christmas_holiday_pack:leggings_cane", 1)
stuffer.register_stuff("christmas_holiday_pack:boots_cane", 1)
stuffer.register_stuff("christmas_holiday_pack:shield_cane", 1)
stuffer.register_stuff("farming:chocolate_dark", 25)
stuffer.register_stuff("christmas_holiday_pack:peppermint_candies", 25)
stuffer.register_stuff("christmas_holiday_pack:green_candy_cane", 25)
stuffer.register_stuff("christmas_holiday_pack:green_peppermint_candies", 25)
stuffer.register_stuff("christmas_holiday_pack:sugar_cookie_tree", 25)

-- REGISTER STUFFERS ABOVE HERE
function stocking.get_stocking_formspec(pos)
	local spos = pos.x .. "," .. pos.y .. "," ..pos.z
	local formspec =
		"size[9,9]"..
		"background[-0.8,-0.4;10,10;christmas_holiday_pack_stocking_background.png]"..
		"image_button_exit[7.75,1;1,1;christmas_holiday_pack_stocking_exit_button.png;exit;]"..
		"listcolors[#D4393C;#d45658]"..
		"list[nodemeta:".. spos .. ";main;-0.2,2;8,2;]"..
		"list[current_player;main;-0.2,5;8,4;]" ..
		"listring[current_player;main]"
	return formspec
end

stocking.can_dig_function = function(pos, player)
	local meta = minetest.get_meta(pos);
	local name = player and player:get_player_name()
	local owner = meta:get_string("owner")
	local inv = meta:get_inventory()
	return name == owner and inv:is_empty("main")
end

local days_elapsed_in_year = function(year, month, day)
	local days_elapsed_in_month = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}
	local days_elapsed_in_leapyear_month = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335}

	local function is_leap_year(year)
		return year % 4 == 0 and (year % 100 ~= 0 or year % 400 == 0)
	end

	if is_leap_year(year) then
		return (days_elapsed_in_leapyear_month[month] + (day - 1))
	else
		return (days_elapsed_in_month[month] + (day - 1))
	end
end

local date_in_seconds = function()
	local year = tonumber(os.date("%Y"))
	local month = tonumber(os.date("%m"))
	local day = tonumber(os.date("%d"))
	local second =  tonumber(os.date("%S"))
	local minute = tonumber(os.date("%M"))
	local hour = tonumber(os.date("%H"))
	return ((days_elapsed_in_year(year, month, day) * 86400) + (hour * 3600) + (minute * 60) + second)
end

local christmas_date = 30931200 --Christmas date in seconds

check_fillable = function(pos)
	local year = tonumber(os.date("%Y"))
	local meta = minetest.get_meta(pos)
	if year == meta:get_int("fill_year") then
		if date_in_seconds() > christmas_date then
			return true
		elseif date_in_seconds() <= christmas_date then
			return false
		end
	elseif year > meta:get_int("fill_year") then
		return true
	end
end,

minetest.register_node("christmas_holiday_pack:stocking", {
	description = "Stocking",
	drawtype = "signlike",
	tiles = {"christmas_holiday_pack_stocking.png"},
	inventory_image = "christmas_holiday_pack_stocking.png",
	wield_image = "christmas_holiday_pack_stocking.png",
	walkable = false,
	selection_box = {
		type = "wallmounted",
	},
	paramtype2 = "colorwallmounted",
	sunlight_propagates = true,
	groups = {snappy = 3},
	sounds = default.node_sound_leaves_defaults(),
	allow_metadata_inventory_put = function(pos, listname, index, stack, player)
		if player then
			minetest.chat_send_player(player:get_player_name(), "Wait until Christmas Eve for Santa to fill your stocking!")
			return 0
		end
	end,
	on_place = function(itemstack, placer, pointed_thing)
		if minetest.is_yes(placer:get_attribute("has_placed_stocking")) then
			minetest.chat_send_player(placer:get_player_name(), "Santa won't fill more than one stocking!")
			return itemstack
		else
			return minetest.item_place(itemstack, placer, pointed_thing)
		end
	end,
	after_place_node = function(pos, placer, itemstack, pointed_thing)
		local meta = minetest.get_meta(pos)
		local owner = placer:get_player_name()
		meta:set_string("owner", owner)
		meta:set_string("infotext", owner.."'s Stocking")
		local inv = meta:get_inventory()
		inv:set_size("main", 8*2)
		placer:set_attribute("has_placed_stocking", "true")
		local year = tonumber(os.date("%Y"))
		if date_in_seconds() >= christmas_date then
			meta:set_int("fill_year", year + 1)
		elseif date_in_seconds() < christmas_date then
			meta:set_int("fill_year", year)
		end
	end,
	on_rightclick = function(pos, node, clicker, itemstack)
		local meta = minetest.get_meta(pos)
		local inv = meta:get_inventory()
		local player = clicker:get_player_name()
		local stuffers = stuffer.select_stuffers()
		local year = tonumber(os.date("%Y"))
		local owner  = meta:get_string("owner")
		if owner == player then
			if check_fillable(pos) == true or clicker:get_attribute("needs_fill") == "true" then
				for i=1, #stuffers do
					inv:set_stack("main", i, stuffers[i])
				end
				if date_in_seconds() >= christmas_date then
					meta:set_int("fill_year", year + 1)
				elseif date_in_seconds() < christmas_date then
					meta:set_int("fill_year", year)
				end
				clicker:set_attribute("needs_fill", "false")
			end
			if owner == player then
				minetest.show_formspec(
					clicker:get_player_name(),
					"default:chest_locked",
					stocking.get_stocking_formspec(pos))
			else
				return itemstack
			end
			return itemstack
		end
	end,
	can_dig = stocking.can_dig_function,
	on_metadata_inventory_move = function(pos, from_list, from_index,
			to_list, to_index, count, player)
		minetest.log("action", player:get_player_name() ..
			" moves stuff in stocking at " .. minetest.pos_to_string(pos))
	end,
    on_metadata_inventory_put = function(pos, listname, index, stack, player)
		minetest.log("action", player:get_player_name() ..
			" moves stuff to stocking at " .. minetest.pos_to_string(pos))
	end,
    on_metadata_inventory_take = function(pos, listname, index, stack, player)
		minetest.log("action", player:get_player_name() ..
			" takes stuff from stocking at " .. minetest.pos_to_string(pos))
	end,
	on_dig = function(pos, node, digger)
		local meta = minetest.get_meta(pos)
		local inv = digger:get_inventory()
		if stocking.can_dig_function(pos, digger) then
			if minetest.is_yes(check_fillable(pos)) then
				digger:set_attribute("needs_fill", "true")
			end
			digger:set_attribute("has_placed_stocking", "false")
			minetest.remove_node(pos)
			inv:add_item("main", "christmas_holiday_pack:stocking")
		end
	end
})
-- Green Stocking
minetest.register_node("christmas_holiday_pack:green_stocking", {
	description = "Green Stocking",
	drawtype = "signlike",
	tiles = {"christmas_holiday_pack_green_stocking.png"},
	inventory_image = "christmas_holiday_pack_green_stocking.png",
	wield_image = "christmas_holiday_pack_green_stocking.png",
	walkable = false,
	selection_box = {
		type = "wallmounted",
	},
	paramtype2 = "colorwallmounted",
	sunlight_propagates = true,
	groups = {snappy = 3},
	sounds = default.node_sound_leaves_defaults(),
	allow_metadata_inventory_put = function(pos, listname, index, stack, player)
		if player then
			minetest.chat_send_player(player:get_player_name(), "Wait until Christmas Eve for Santa to fill your stocking!")
			return 0
		end
	end,
	on_place = function(itemstack, placer, pointed_thing)
		if minetest.is_yes(placer:get_attribute("has_placed_stocking")) then
			minetest.chat_send_player(placer:get_player_name(), "Santa won't fill more than one stocking!")
			return itemstack
		else
			return minetest.item_place(itemstack, placer, pointed_thing)
		end
	end,
	after_place_node = function(pos, placer, itemstack, pointed_thing)
		local meta = minetest.get_meta(pos)
		local owner = placer:get_player_name()
		meta:set_string("owner", owner)
		meta:set_string("infotext", owner.."'s Stocking")
		local inv = meta:get_inventory()
		inv:set_size("main", 8*2)
		placer:set_attribute("has_placed_stocking", "true")
		local year = tonumber(os.date("%Y"))
		if date_in_seconds() >= christmas_date then
			meta:set_int("fill_year", year + 1)
		elseif date_in_seconds() < christmas_date then
			meta:set_int("fill_year", year)
		end
	end,
	on_rightclick = function(pos, node, clicker, itemstack)
		local meta = minetest.get_meta(pos)
		local inv = meta:get_inventory()
		local player = clicker:get_player_name()
		local stuffers = stuffer.select_stuffers()
		local year = tonumber(os.date("%Y"))
		local owner  = meta:get_string("owner")
		if owner == player then
			if check_fillable(pos) == true or clicker:get_attribute("needs_fill") == "true" then
				for i=1, #stuffers do
					inv:set_stack("main", i, stuffers[i])
				end
				if date_in_seconds() >= christmas_date then
					meta:set_int("fill_year", year + 1)
				elseif date_in_seconds() < christmas_date then
					meta:set_int("fill_year", year)
				end
				clicker:set_attribute("needs_fill", "false")
			end
			if owner == player then
				minetest.show_formspec(
					clicker:get_player_name(),
					"default:chest_locked",
					stocking.get_stocking_formspec(pos))
			else
				return itemstack
			end
			return itemstack
		end
	end,
	can_dig = stocking.can_dig_function,
	on_metadata_inventory_move = function(pos, from_list, from_index,
			to_list, to_index, count, player)
		minetest.log("action", player:get_player_name() ..
			" moves stuff in stocking at " .. minetest.pos_to_string(pos))
	end,
    on_metadata_inventory_put = function(pos, listname, index, stack, player)
		minetest.log("action", player:get_player_name() ..
			" moves stuff to stocking at " .. minetest.pos_to_string(pos))
	end,
    on_metadata_inventory_take = function(pos, listname, index, stack, player)
		minetest.log("action", player:get_player_name() ..
			" takes stuff from stocking at " .. minetest.pos_to_string(pos))
	end,
	on_dig = function(pos, node, digger)
		local meta = minetest.get_meta(pos)
		local inv = digger:get_inventory()
		if stocking.can_dig_function(pos, digger) then
			if minetest.is_yes(check_fillable(pos)) then
				digger:set_attribute("needs_fill", "true")
			end
			digger:set_attribute("has_placed_stocking", "false")
			minetest.remove_node(pos)
			inv:add_item("main", "christmas_holiday_pack:stocking")
		end
	end
})

-- Crafts
--minetest.register_craft({
--	output = "christmas_decor:stocking",
--	recipe = {
--		{"", "wool:white", "wool:white"},
--		{"", "wool:red", "wool:red"},
--		{"wool:red", "wool:red", "wool:red"},
--	}
--})


code:
--Register Candy Cane Pickaxe
minetest.register_tool("christmas_holiday_pack:candy_cane_pickaxe", {
	description = "Candy Cane Pickaxe",
	inventory_image = "christmas_holiday_pack_candy_cane_pickaxe.png",
	tool_capabilities = {
		full_punch_interval = 0.9,
		max_drop_level=3,
		groupcaps={
			cracky = {times={[1]=2.4, [2]=1.2, [3]=0.60}, uses=20, maxlevel=3},
		},
		damage_groups = {fleshy=5},
	},
})

--Register Candy Cane Axe
minetest.register_tool("christmas_holiday_pack:candy_cane_axe", {
	description = "Candy Cane Axe",
	inventory_image = "christmas_holiday_pack_candy_cane_axe.png",
	tool_capabilities = {
		full_punch_interval = 0.9,
		max_drop_level=1,
		groupcaps={
			choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=20, maxlevel=3},
		},
		damage_groups = {fleshy=6},
	}
})

--Register Candy Cane Sword
minetest.register_tool("christmas_holiday_pack:candy_cane_sword", {
	description = "Candy Cane Sword",
	inventory_image = "christmas_holiday_pack_candy_cane_sword.png",
	tool_capabilities = {
		full_punch_interval = 0.7,
		max_drop_level=1,
		groupcaps={
			snappy={times={[1]=2.0, [2]=1.00, [3]=0.35}, uses=30, maxlevel=3},
		},
		damage_groups = {fleshy=7},
	}
})

-- Add toolranks support
if minetest.get_modpath("toolranks") then
	-- Helper function
	local function add_tool(name, desc, afteruse)
		minetest.override_item(name, {
			original_description = desc,
			description = toolranks.create_description(desc, 0, 1),
			after_use = afteruse and toolranks.new_afteruse
		})
	end
	add_tool("christmas_holiday_pack:candy_cane_pickaxe", "Candy Cane Pickaxe", true)
	add_tool("christmas_holiday_pack:candy_cane_axe", "Candy Cane Axe", true)
	add_tool("christmas_holiday_pack:candy_cane_sword", "Candy Cane Sword", true)
end


code:
	 _   _       _ _
	| | | | __ _| | | _____      _____  ___ _ __
	| |_| |/ _` | | |/ _ \ \ /\ / / _ \/ _ \ '_ \
	|  _  | (_| | | | (_) \ V  V /  __/  __/ | | |
	|_| |_|\__,_|_|_|\___/ \_/\_/ \___|\___|_| |_|  ~By GreenDimond

Adds Halloween costumes and treats.

Depends on Stu's 3d_armor (optional, but costumes wont register without it),
TenPlus1's farming_redo, dye, and default.

* **Candie Stuffs**:
	* Generic Halloween Candy
	* Lolipop
	* Caramel Apple
	* Candycorn
	* Caramelized Sugar (for crafting)

* **Costumes**:
	* Dark Unicorn
	* Devil
	* Female Devil
	* Dinosaur
	* Frankenstein (Frankenstein's Monster)
	* Ghost
	* Harry Potter
	* Killer
	* Glow-in-the-Dark Skeleton (actually glows in 5.0+)
	* Grim Reaper
	* Pink Dinosaur
	* Pumpkin Monster
	* Totoro
	* Unicorn
	* Vampire
	* Wearwolf
	* Pumpkin Mask
	* Cat Mask
	* Halloween Hoodie

**IMPORTANT:** Costumes are not craftable, and are therefore only obtainable
using /giveme or the creative inventory.

**Crafting:**

* Caramelized Sugar:
Cook sugar in furnace.

* Lolipop:
(o = orange dye, p = paper, c = caramelized sugar, s = stick)
```
+-+-+-+
| |o| |
+-+-+-+
|p|c|p|
+-+-+-+
| |s| |
+-+-+-+
```

* Candycorn:
Shapeless - Orange dye, yellow dye, white dye, caramelized sugar.

* Halloween Candy
Shapeless - Bar of Dark Chocolate (farming_redo), paper, orange dye, caramelized sugar.

* Caramel Apple
(c = caramelized sugar, a = apple, s = stick)
```
+-+-+-+
| |c| |
+-+-+-+
| |a| |
+-+-+-+
| |s| |
+-+-+-+
```