Reset pointing range limit for bow

This commit is contained in:
Wuzzy 2020-11-12 11:37:50 +01:00
parent 8512b7c2e0
commit 41af1eddba

@ -114,11 +114,9 @@ S("The speed and damage of the arrow increases the longer you charge. The regula
inventory_image = "mcl_bows_bow.png", inventory_image = "mcl_bows_bow.png",
wield_scale = { x = 1.8, y = 1.8, z = 1 }, wield_scale = { x = 1.8, y = 1.8, z = 1 },
stack_max = 1, stack_max = 1,
-- Trick to disable melee damage to entities. range = 4,
-- Range not set to 0 (unlike the others) so it can be placed into item frames
range = 1,
-- Trick to disable digging as well -- Trick to disable digging as well
on_use = function() end, on_use = function() return end,
groups = {weapon=1,weapon_ranged=1}, groups = {weapon=1,weapon_ranged=1},
}) })
@ -157,6 +155,8 @@ for level=0, 2 do
stack_max = 1, stack_max = 1,
range = 0, -- Pointing range to 0 to prevent punching with bow :D range = 0, -- Pointing range to 0 to prevent punching with bow :D
groups = {not_in_creative_inventory=1, not_in_craft_guide=1}, groups = {not_in_creative_inventory=1, not_in_craft_guide=1},
-- Trick to disable digging as well
on_use = function() return end,
on_drop = function(itemstack, dropper, pos) on_drop = function(itemstack, dropper, pos)
reset_bow_state(dropper) reset_bow_state(dropper)
itemstack:set_name("mcl_bows:bow") itemstack:set_name("mcl_bows:bow")