This commit is contained in:
Elias Fleckenstein 2021-01-27 15:46:10 +01:00
parent db3a31c2c4
commit 5ede42bbe7
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ S("An arrow fired from a bow has a regular damage of 1-9. At full charge, there'
S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."), S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."),
_doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."), _doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."),
inventory_image = "mcl_bows_arrow_inv.png", inventory_image = "mcl_bows_arrow_inv.png",
groups = { ammo=1, ammo_bow=1 }, groups = { ammo=1, ammo_bow=1, ammo_bow_regular=1 },
_on_dispense = function(itemstack, dispenserpos, droppos, dropnode, dropdir) _on_dispense = function(itemstack, dispenserpos, droppos, dropnode, dropdir)
-- Shoot arrow -- Shoot arrow
local shootpos = vector.add(dispenserpos, vector.multiply(dropdir, 0.51)) local shootpos = vector.add(dispenserpos, vector.multiply(dropdir, 0.51))

View File

@ -100,7 +100,7 @@ local player_shoot_arrow = function(itemstack, player, power, damage, is_critica
return false return false
end end
arrow_itemstring = arrow_stack:get_name() arrow_itemstring = arrow_stack:get_name()
if not has_infinity_enchantment then if not has_infinity_enchantment or minetest.get_item_group(arrow_itemstring, "ammo_bow_regular") == 0 then
arrow_stack:take_item() arrow_stack:take_item()
end end
local inv = player:get_inventory() local inv = player:get_inventory()