diff --git a/mods/throwing/README b/mods/throwing/README new file mode 100644 index 00000000..826f470d --- /dev/null +++ b/mods/throwing/README @@ -0,0 +1,47 @@ +=== THROWING-MOD for MINETEST-C55 === +by PilzAdam + +Inroduction: +This mod adds bows and arrows to Minetest. + +How to install: +Unzip the archive an place it in minetest-base-directory/mods/minetest/ +if you have a windows client or a linux run-in-place client. If you have +a linux system-wide instalation place it in ~/.minetest/mods/minetest/. +If you want to install this mod only in one world create the folder +worldmods/ in your worlddirectory. +For further information or help see: +http://wiki.minetest.com/wiki/Installing_Mods + +How to use the mod: +Craft a bow with the strings from the farming mod: +string wood +string wood +string wood +Craft arrows with: +stick stick steel +Select the bow and shoot with left mouse click. Every shoot will take 1 +arrow from your inventory and wears out the bow (you have around 50 +shoots). + +License: +This mod was originally published by Jeija. +Sourcecode: WTFPL (see below) +Grahpics: WTFPL (see below) + +See also: +http://minetest.net/ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/mods/throwing/arrow.lua b/mods/throwing/arrow.lua new file mode 100644 index 00000000..3e237fd4 --- /dev/null +++ b/mods/throwing/arrow.lua @@ -0,0 +1,81 @@ +minetest.register_craftitem("throwing:arrow", { + description = "Arrow", + inventory_image = "throwing_arrow.png", +}) + +minetest.register_node("throwing:arrow_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"throwing_arrow.png", "throwing_arrow.png", "throwing_arrow_back.png", "throwing_arrow_front.png", "throwing_arrow_2.png", "throwing_arrow.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"throwing:arrow_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "throwing:arrow_entity" and obj:get_luaentity().name ~= "__builtin:item" then + obj:set_hp(obj:get_hp()-2) + if obj:get_hp() <= 0 then + obj:remove() + end + self.object:remove() + end + else + obj:set_hp(obj:get_hp()-2) + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + minetest.env:add_item(self.lastpos, 'throwing:arrow') + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("throwing:arrow_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'throwing:arrow 16', + recipe = { + {'default:stick', 'default:stick', 'default:steel_ingot'}, + } +}) diff --git a/mods/throwing/build_arrow.lua b/mods/throwing/build_arrow.lua new file mode 100644 index 00000000..2ea1bf6e --- /dev/null +++ b/mods/throwing/build_arrow.lua @@ -0,0 +1,85 @@ +minetest.register_craftitem("throwing:arrow_build", { + description = "Build Arrow", + inventory_image = "throwing_arrow_build.png", +}) + +minetest.register_node("throwing:arrow_build_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"throwing_arrow_build.png", "throwing_arrow_build.png", "throwing_arrow_build_back.png", "throwing_arrow_build_front.png", "throwing_arrow_build_2.png", "throwing_arrow_build.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"throwing:arrow_build_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, + node = "", +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "throwing:arrow_build_entity" and obj:get_luaentity().name ~= "__builtin:item" then + if self.node ~= "" then + minetest.env:set_node(self.lastpos, {name=self.node}) + end + self.object:remove() + end + else + if self.node ~= "" then + minetest.env:set_node(self.lastpos, {name=self.node}) + end + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + if self.node ~= "" then + minetest.env:set_node(self.lastpos, {name=self.node}) + end + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("throwing:arrow_build_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'throwing:arrow_build', + recipe = { + {'default:stick', 'default:stick', 'default:shovel_steel'}, + } +}) diff --git a/mods/throwing/depends.txt b/mods/throwing/depends.txt new file mode 100644 index 00000000..252d6655 --- /dev/null +++ b/mods/throwing/depends.txt @@ -0,0 +1,4 @@ +default +bucket +fire +farming diff --git a/mods/throwing/dig_arrow.lua b/mods/throwing/dig_arrow.lua new file mode 100644 index 00000000..e756a34d --- /dev/null +++ b/mods/throwing/dig_arrow.lua @@ -0,0 +1,81 @@ +minetest.register_craftitem("throwing:arrow_dig", { + description = "Dig Arrow", + inventory_image = "throwing_arrow_dig.png", +}) + +minetest.register_node("throwing:arrow_dig_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"throwing_arrow_dig.png", "throwing_arrow_dig.png", "throwing_arrow_dig_back.png", "throwing_arrow_dig_front.png", "throwing_arrow_dig_2.png", "throwing_arrow_dig.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"throwing:arrow_dig_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 1) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "throwing:arrow_dig_entity" and obj:get_luaentity().name ~= "__builtin:item" then + minetest.env:add_item(pos, 'throwing:arrow_dig') + minetest.env:remove_node(pos) + self.object:remove() + end + else + minetest.env:add_item(pos, 'throwing:arrow_dig') + minetest.env:remove_node(pos) + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + minetest.env:add_item(self.lastpos, 'throwing:arrow_dig') + minetest.env:remove_node(pos) + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("throwing:arrow_dig_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'throwing:arrow_dig', + recipe = { + {'default:stick', 'default:stick', 'default:pick_steel'}, + } +}) diff --git a/mods/throwing/fire_arrow.lua b/mods/throwing/fire_arrow.lua new file mode 100644 index 00000000..e3b930d6 --- /dev/null +++ b/mods/throwing/fire_arrow.lua @@ -0,0 +1,114 @@ +minetest.register_craftitem("throwing:arrow_fire", { + description = "Fire Arrow", + inventory_image = "throwing_arrow_fire.png", +}) + +minetest.register_node("throwing:arrow_fire_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"throwing_arrow_fire.png", "throwing_arrow_fire.png", "throwing_arrow_fire_back.png", "throwing_arrow_fire_front.png", "throwing_arrow_fire_2.png", "throwing_arrow_fire.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"throwing:arrow_fire_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "throwing:arrow_fire_entity" and obj:get_luaentity().name ~= "__builtin:item" then + obj:set_hp(obj:get_hp()-3) + if obj:get_hp() <= 0 then + obj:remove() + end + self.object:remove() + end + else + obj:set_hp(obj:get_hp()-3) + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" and node.name ~= "throwing:light" then + minetest.env:set_node(self.lastpos, {name="fire:basic_flame"}) + self.object:remove() + end + if math.floor(self.lastpos.x+0.5) ~= math.floor(pos.x+0.5) or math.floor(self.lastpos.y+0.5) ~= math.floor(pos.y+0.5) or math.floor(self.lastpos.z+0.5) ~= math.floor(pos.z+0.5) then + if minetest.env:get_node(self.lastpos).name == "throwing:light" then + minetest.env:remove_node(self.lastpos) + end + if minetest.env:get_node(pos).name == "air" then + minetest.env:set_node(pos, {name="throwing:light"}) + end + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("throwing:arrow_fire_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'throwing:arrow_fire 4', + recipe = { + {'default:stick', 'default:stick', 'bucket:bucket_lava'}, + }, + replacements = { + {"bucket:bucket_lava", "bucket:bucket_empty"} + } +}) + +minetest.register_node("throwing:light", { + drawtype = "glasslike", + tiles = {"throwing_empty.png"}, + light_source = LIGHT_MAX-4, + selection_box = { + type = "fixed", + fixed = { + {0,0,0,0,0,0} + } + }, + groups = {not_in_creative_inventory=1} +}) + +minetest.register_abm({ + nodenames = {"throwing:light"}, + interval = 10, + chance = 1, + action = function(pos, node) + minetest.env:remove_node(pos) + end +}) diff --git a/mods/throwing/init.lua b/mods/throwing/init.lua new file mode 100644 index 00000000..108eb45e --- /dev/null +++ b/mods/throwing/init.lua @@ -0,0 +1,99 @@ +arrows = { + {"throwing:arrow", "throwing:arrow_entity"}, + {"throwing:arrow_fire", "throwing:arrow_fire_entity"}, + {"throwing:arrow_teleport", "throwing:arrow_teleport_entity"}, + {"throwing:arrow_dig", "throwing:arrow_dig_entity"}, + {"throwing:arrow_build", "throwing:arrow_build_entity"} +} + +local throwing_shoot_arrow = function(itemstack, player) + for _,stack in ipairs(player:get_inventory():get_list("main")) do + for _,arrow in ipairs(arrows) do + if stack:get_name() == arrow[1] then + player:get_inventory():remove_item("main", arrow[1]) + local playerpos = player:getpos() + local obj = minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) + local dir = player:get_look_dir() + obj:setvelocity({x=dir.x*19, y=dir.y*19, z=dir.z*19}) + obj:setacceleration({x=dir.x*-3, y=-10, z=dir.z*-3}) + obj:setyaw(player:get_look_yaw()+math.pi) + minetest.sound_play("throwing_sound", {pos=playerpos}) + if obj:get_luaentity().player == "" then + obj:get_luaentity().player = player + end + obj:get_luaentity().node = player:get_inventory():get_stack("main", 1):get_name() + return true + end + end + end + return false +end + +minetest.register_tool("throwing:bow_wood", { + description = "Wood Bow", + inventory_image = "throwing_bow_wood.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + if throwing_shoot_arrow(itemstack, user, pointed_thing) then + itemstack:add_wear(65535/50) + end + return itemstack + end, +}) + +minetest.register_craft({ + output = 'throwing:bow_wood', + recipe = { + {'farming:string', 'default:wood', ''}, + {'farming:string', '', 'default:wood'}, + {'farming:string', 'default:wood', ''}, + } +}) + +minetest.register_tool("throwing:bow_stone", { + description = "Stone Bow", + inventory_image = "throwing_bow_stone.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + if throwing_shoot_arrow(item, user, pointed_thing) then + itemstack:add_wear(65535/100) + end + return itemstack + end, +}) + +minetest.register_craft({ + output = 'throwing:bow_stone', + recipe = { + {'farming:string', 'default:cobble', ''}, + {'farming:string', '', 'default:cobble'}, + {'farming:string', 'default:cobble', ''}, + } +}) + +minetest.register_tool("throwing:bow_steel", { + description = "Steel Bow", + inventory_image = "throwing_bow_steel.png", + stack_max = 1, + on_use = function(itemstack, user, pointed_thing) + if throwing_shoot_arrow(item, user, pointed_thing) then + itemstack:add_wear(65535/200) + end + return itemstack + end, +}) + +minetest.register_craft({ + output = 'throwing:bow_steel', + recipe = { + {'farming:string', 'default:steel_ingot', ''}, + {'farming:string', '', 'default:steel_ingot'}, + {'farming:string', 'default:steel_ingot', ''}, + } +}) + +dofile(minetest.get_modpath("throwing").."/arrow.lua") +dofile(minetest.get_modpath("throwing").."/fire_arrow.lua") +dofile(minetest.get_modpath("throwing").."/teleport_arrow.lua") +dofile(minetest.get_modpath("throwing").."/dig_arrow.lua") +dofile(minetest.get_modpath("throwing").."/build_arrow.lua") \ No newline at end of file diff --git a/mods/throwing/sounds/throwing_sound.ogg b/mods/throwing/sounds/throwing_sound.ogg new file mode 100644 index 00000000..c8911e5f Binary files /dev/null and b/mods/throwing/sounds/throwing_sound.ogg differ diff --git a/mods/throwing/teleport_arrow.lua b/mods/throwing/teleport_arrow.lua new file mode 100644 index 00000000..301cc5d6 --- /dev/null +++ b/mods/throwing/teleport_arrow.lua @@ -0,0 +1,88 @@ +minetest.register_craftitem("throwing:arrow_teleport", { + description = "Teleport Arrow", + inventory_image = "throwing_arrow_teleport.png", +}) + +minetest.register_node("throwing:arrow_teleport_box", { + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + -- Shaft + {-6.5/17, -1.5/17, -1.5/17, 6.5/17, 1.5/17, 1.5/17}, + --Spitze + {-4.5/17, 2.5/17, 2.5/17, -3.5/17, -2.5/17, -2.5/17}, + {-8.5/17, 0.5/17, 0.5/17, -6.5/17, -0.5/17, -0.5/17}, + --Federn + {6.5/17, 1.5/17, 1.5/17, 7.5/17, 2.5/17, 2.5/17}, + {7.5/17, -2.5/17, 2.5/17, 6.5/17, -1.5/17, 1.5/17}, + {7.5/17, 2.5/17, -2.5/17, 6.5/17, 1.5/17, -1.5/17}, + {6.5/17, -1.5/17, -1.5/17, 7.5/17, -2.5/17, -2.5/17}, + + {7.5/17, 2.5/17, 2.5/17, 8.5/17, 3.5/17, 3.5/17}, + {8.5/17, -3.5/17, 3.5/17, 7.5/17, -2.5/17, 2.5/17}, + {8.5/17, 3.5/17, -3.5/17, 7.5/17, 2.5/17, -2.5/17}, + {7.5/17, -2.5/17, -2.5/17, 8.5/17, -3.5/17, -3.5/17}, + } + }, + tiles = {"throwing_arrow_teleport.png", "throwing_arrow_teleport.png", "throwing_arrow_teleport_back.png", "throwing_arrow_teleport_front.png", "throwing_arrow_teleport_2.png", "throwing_arrow_teleport.png"}, + groups = {not_in_creative_inventory=1}, +}) + +local THROWING_ARROW_ENTITY={ + physical = false, + timer=0, + visual = "wielditem", + visual_size = {x=0.1, y=0.1}, + textures = {"throwing:arrow_teleport_box"}, + lastpos={}, + collisionbox = {0,0,0,0,0,0}, + player = "", +} + +THROWING_ARROW_ENTITY.on_step = function(self, dtime) + self.timer=self.timer+dtime + local pos = self.object:getpos() + local node = minetest.env:get_node(pos) + + if self.timer>0.2 then + local objs = minetest.env:get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2) + for k, obj in pairs(objs) do + if obj:get_luaentity() ~= nil then + if obj:get_luaentity().name ~= "throwing:arrow_teleport_entity" and obj:get_luaentity().name ~= "__builtin:item" then + if self.player ~= "" then + self.player:setpos(pos) + self.player:get_inventory():add_item("main", ItemStack("throwing:arrow_teleport")) + end + self.object:remove() + end + else + if self.player ~= "" then + self.player:setpos(pos) + self.player:get_inventory():add_item("main", ItemStack("throwing:arrow_teleport")) + end + self.object:remove() + end + end + end + + if self.lastpos.x~=nil then + if node.name ~= "air" then + if self.player ~= "" then + self.player:setpos(self.lastpos) + self.player:get_inventory():add_item("main", ItemStack("throwing:arrow_teleport")) + end + self.object:remove() + end + end + self.lastpos={x=pos.x, y=pos.y, z=pos.z} +end + +minetest.register_entity("throwing:arrow_teleport_entity", THROWING_ARROW_ENTITY) + +minetest.register_craft({ + output = 'throwing:arrow_teleport', + recipe = { + {'default:stick', 'default:stick', 'default:mese'}, + } +}) diff --git a/mods/throwing/textures/throwing_arrow.png b/mods/throwing/textures/throwing_arrow.png new file mode 100644 index 00000000..9b72ee98 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow.png differ diff --git a/mods/throwing/textures/throwing_arrow_2.png b/mods/throwing/textures/throwing_arrow_2.png new file mode 100644 index 00000000..b5980d02 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_2.png differ diff --git a/mods/throwing/textures/throwing_arrow_back.png b/mods/throwing/textures/throwing_arrow_back.png new file mode 100644 index 00000000..d680d88f Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_back.png differ diff --git a/mods/throwing/textures/throwing_arrow_build.png b/mods/throwing/textures/throwing_arrow_build.png new file mode 100644 index 00000000..02653e13 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_build.png differ diff --git a/mods/throwing/textures/throwing_arrow_build_2.png b/mods/throwing/textures/throwing_arrow_build_2.png new file mode 100644 index 00000000..fd576d40 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_build_2.png differ diff --git a/mods/throwing/textures/throwing_arrow_build_back.png b/mods/throwing/textures/throwing_arrow_build_back.png new file mode 100644 index 00000000..18c2f02c Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_build_back.png differ diff --git a/mods/throwing/textures/throwing_arrow_build_front.png b/mods/throwing/textures/throwing_arrow_build_front.png new file mode 100644 index 00000000..b6b69672 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_build_front.png differ diff --git a/mods/throwing/textures/throwing_arrow_dig.png b/mods/throwing/textures/throwing_arrow_dig.png new file mode 100644 index 00000000..02f6a000 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_dig.png differ diff --git a/mods/throwing/textures/throwing_arrow_dig_2.png b/mods/throwing/textures/throwing_arrow_dig_2.png new file mode 100644 index 00000000..b514b5d2 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_dig_2.png differ diff --git a/mods/throwing/textures/throwing_arrow_dig_back.png b/mods/throwing/textures/throwing_arrow_dig_back.png new file mode 100644 index 00000000..97422572 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_dig_back.png differ diff --git a/mods/throwing/textures/throwing_arrow_dig_front.png b/mods/throwing/textures/throwing_arrow_dig_front.png new file mode 100644 index 00000000..6681c998 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_dig_front.png differ diff --git a/mods/throwing/textures/throwing_arrow_fire.png b/mods/throwing/textures/throwing_arrow_fire.png new file mode 100644 index 00000000..8f5075a3 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_fire.png differ diff --git a/mods/throwing/textures/throwing_arrow_fire_2.png b/mods/throwing/textures/throwing_arrow_fire_2.png new file mode 100644 index 00000000..ed0aa5fb Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_fire_2.png differ diff --git a/mods/throwing/textures/throwing_arrow_fire_back.png b/mods/throwing/textures/throwing_arrow_fire_back.png new file mode 100644 index 00000000..8a7d9930 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_fire_back.png differ diff --git a/mods/throwing/textures/throwing_arrow_fire_front.png b/mods/throwing/textures/throwing_arrow_fire_front.png new file mode 100644 index 00000000..3994257d Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_fire_front.png differ diff --git a/mods/throwing/textures/throwing_arrow_front.png b/mods/throwing/textures/throwing_arrow_front.png new file mode 100644 index 00000000..828a486f Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_front.png differ diff --git a/mods/throwing/textures/throwing_arrow_teleport.png b/mods/throwing/textures/throwing_arrow_teleport.png new file mode 100644 index 00000000..f95d3e8b Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_teleport.png differ diff --git a/mods/throwing/textures/throwing_arrow_teleport_2.png b/mods/throwing/textures/throwing_arrow_teleport_2.png new file mode 100644 index 00000000..6e8eaa9b Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_teleport_2.png differ diff --git a/mods/throwing/textures/throwing_arrow_teleport_back.png b/mods/throwing/textures/throwing_arrow_teleport_back.png new file mode 100644 index 00000000..e0bba027 Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_teleport_back.png differ diff --git a/mods/throwing/textures/throwing_arrow_teleport_front.png b/mods/throwing/textures/throwing_arrow_teleport_front.png new file mode 100644 index 00000000..80138c4c Binary files /dev/null and b/mods/throwing/textures/throwing_arrow_teleport_front.png differ diff --git a/mods/throwing/textures/throwing_bow_steel.png b/mods/throwing/textures/throwing_bow_steel.png new file mode 100644 index 00000000..e14c45c4 Binary files /dev/null and b/mods/throwing/textures/throwing_bow_steel.png differ diff --git a/mods/throwing/textures/throwing_bow_stone.png b/mods/throwing/textures/throwing_bow_stone.png new file mode 100644 index 00000000..93b86dd2 Binary files /dev/null and b/mods/throwing/textures/throwing_bow_stone.png differ diff --git a/mods/throwing/textures/throwing_bow_wood.png b/mods/throwing/textures/throwing_bow_wood.png new file mode 100644 index 00000000..07f303a5 Binary files /dev/null and b/mods/throwing/textures/throwing_bow_wood.png differ diff --git a/mods/throwing/textures/throwing_empty.png b/mods/throwing/textures/throwing_empty.png new file mode 100644 index 00000000..6bbd5547 Binary files /dev/null and b/mods/throwing/textures/throwing_empty.png differ