minetest.register_node("bows:target", { description = "Target", tiles = {"default_wood.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png","default_wood.png^bows_target.png","default_wood.png"}, groups = {choppy = 2, oddly_breakable_by_hand = 2,mesecon = 2}, drawtype="nodebox", node_box = { type = "fixed", fixed = { {-0.5, -0.1875, 0.375, 0.5, 0.1875, 0.5}, {-0.4375, -0.25, 0.375, 0.4375, 0.25, 0.5}, {-0.375, -0.375, 0.375, 0.375, 0.375, 0.5}, {-0.25, -0.4375, 0.375, 0.25, 0.4375, 0.5}, {-0.125, -0.5, 0.375, 0.125, 0.5, 0.5}, } }, paramtype2="facedir", paramtype = "light", sunlight_propagates = true, mesecons = {receptor = {state = "off"}}, on_timer = function (pos, elapsed) mesecon.receptor_off(pos) return false end, }) minetest.register_craft({ output = "bows:target", recipe = { {"","group:wood",""}, {"group:wood","group:wood","group:wood"}, {"","group:wood",""} } }) minetest.register_craft({output = "default:flint",recipe = {{"default:gravel"},}}) bows.register_bow("bow_wood",{ description="Wooden bow", texture="bows_bow.png", texture_loaded="bows_bow_loaded.png", uses=50, level=1, craft={ {"","group:stick","farming:cotton"}, {"group:stick","","farming:cotton"}, {"","group:stick","farming:cotton"} }, }) bows.register_bow("bow_steel",{ description="Steel bow", texture="bows_bow_steel.png", texture_loaded="bows_bow_loaded_steel.png", uses=140, level=8, craft={ {"","default:steel_ingot","farming:cotton"}, {"default:steel_ingot","","farming:cotton"}, {"","default:steel_ingot","farming:cotton"} }, }) bows.register_bow("bow_mithril",{ description="Mithril bow", texture="bows_bow_mithril.png", texture_loaded="bows_bow_loaded_mithril.png", uses=910, level=19, craft={ {"","moreores:mithril_ingot","farming:cotton"}, {"moreores:mithril_ingot","","farming:cotton"}, {"","moreores:mithril_ingot","farming:cotton"} }, }) bows.register_bow("bow_admin",{ description="Admin bow", texture="bows_bow_admin.png", texture_loaded="bows_bow_loaded_admin.png", level=39, uses=0, }) bows.register_arrow("arrow",{ description="Arrow", texture="bows_arrow_wood.png", damage=5, craft_count=8, craft={{"default:flint","group:stick","group:leaves"},} }) bows.register_arrow("arrow_admin",{ description="Admin arrow", texture="bows_arrow_wood.png^[colorize:#ea00cccc", damage=9000, on_hit_object=bows.arrow_admin_object, on_hit_node=bows.arrow_remove, }) minetest.override_item("bows:arrow_admin", {groups = {arrow=1,not_in_creative_inventory=1}}) bows.register_arrow("arrow_steel",{ description="Steel arrow", texture="bows_arrow_wood.png^[colorize:#FFFFFFcc", damage=8, craft_count=8, craft={ {"group:arrow","group:arrow","group:arrow"}, {"group:arrow","default:steel_ingot","group:arrow"}, {"group:arrow","group:arrow","group:arrow"}, } }) bows.register_arrow("arrow_gold",{ description="Gold arrow", texture="bows_arrow_wood.png^[colorize:#d7c633cc", damage=10, craft_count=8, craft={ {"group:arrow","group:arrow","group:arrow"}, {"group:arrow","default:gold_ingot","group:arrow"}, {"group:arrow","group:arrow","group:arrow"}, } }) bows.register_arrow("arrow_mese",{ description="Mese arrow", texture="bows_arrow_wood.png^[colorize:#e3ff00cc", damage=12, craft_count=8, craft={ {"group:arrow","group:arrow","group:arrow"}, {"group:arrow","default:mese_crystal","group:arrow"}, {"group:arrow","group:arrow","group:arrow"}, } }) bows.register_arrow("arrow_diamond",{ description="Diamond arrow", texture="bows_arrow_wood.png^[colorize:#15d7c2cc", damage=15, craft_count=8, craft={ {"group:arrow","group:arrow","group:arrow"}, {"group:arrow","default:diamond","group:arrow"}, {"group:arrow","group:arrow","group:arrow"}, } }) bows.register_arrow("arrow_mithril",{ description="Mithril arrow", texture="bows_arrow_wood.png^[colorize:#3957A2cc", damage=15, craft_count=8, craft={ {"group:arrow","group:arrow","group:arrow"}, {"group:arrow","moreores:mithril_lump","group:arrow"}, {"group:arrow","group:arrow","group:arrow"}, } }) bows.register_arrow("arrow_fire",{ description="Fire arrow", texture="bows_arrow_wood.png^[colorize:#ffb400cc", damage=10, craft_count=1, on_hit_node=bows.arrow_fire, on_hit_object=bows.arrow_fire_object, craft={ {"group:arrow","default:torch"}, } }) bows.register_arrow("arrow_toxic",{ description="Toxic arrow", texture="bows_arrow_wood.png^[colorize:#66aa11aa", on_hit_object=bows.arrow_toxic, craft_count=1, damage=0, craft={ {"group:arrow","default:papyrus"}, } })