From e396ab8e4d9424ac5030d8a0cdb2a872c46d71a5 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 21 Feb 2017 22:19:37 +0100 Subject: [PATCH] Allow to only shoot fully charged arrows --- mods/ITEMS/mcl_throwing/init.lua | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index b68b0fd755..ef1c2c434d 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -88,17 +88,6 @@ minetest.register_tool("mcl_throwing:bow_0", { groups = {not_in_creative_inventory=1, not_in_craft_guide=1}, on_place = powerup_function("mcl_throwing:bow_1"), on_secondary_use = powerup_function("mcl_throwing:bow_1"), - on_use = function(itemstack, user, pointed_thing) - local wear = itemstack:get_wear() - itemstack:replace("mcl_throwing:bow") - itemstack:set_wear(wear) - if player_shoot_arrow(itemstack, user, pointed_thing) then - if not minetest.setting_getbool("creative_mode") then - itemstack:add_wear(65535/1600) - end - end - return itemstack - end, }) minetest.register_tool("mcl_throwing:bow_1", { @@ -108,17 +97,6 @@ minetest.register_tool("mcl_throwing:bow_1", { groups = {not_in_creative_inventory=1, not_in_craft_guide=1}, on_place = powerup_function("mcl_throwing:bow_2"), on_secondary_use = powerup_function("mcl_throwing:bow_2"), - on_use = function(itemstack, user, pointed_thing) - local wear = itemstack:get_wear() - itemstack:replace("mcl_throwing:bow") - itemstack:set_wear(wear) - if player_shoot_arrow(itemstack, user, pointed_thing) then - if not minetest.setting_getbool("creative_mode") then - itemstack:add_wear(65535/800) - end - end - return itemstack - end, }) minetest.register_tool("mcl_throwing:bow_2", {