mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Make bows and fishing rods show their durability in description (Fixes issue #1773)
This commit is contained in:
parent
5c563d6ffd
commit
df0c1f1dd1
1 changed files with 5 additions and 0 deletions
|
@ -107,3 +107,8 @@ tt.register_snippet(function(itemstring)
|
|||
end
|
||||
end)
|
||||
|
||||
tt.register_snippet(function(itemstring, _, itemstack)
|
||||
if itemstring:sub(1, 23) == "mcl_fishing:fishing_rod" or itemstring:sub(1, 12) == "mcl_bows:bow" then
|
||||
return S("Durability: @1 uses", mcl_util.calculate_durability(itemstack or ItemStack(itemstring)))
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in a new issue