forked from VoxeLibre/VoxeLibre
Merge pull request 'Make bows and fishing rods show their durability in description (Fixes issue #1773)' (#1847) from Emily2255/MineClone2:fishingroddurability into master
Reviewed-on: MineClone2/MineClone2#1847
This commit is contained in:
commit
d76a7daf2d
|
@ -45,3 +45,4 @@ Mining durability: @1=
|
||||||
Block breaking strength: @1=
|
Block breaking strength: @1=
|
||||||
@1 uses=
|
@1 uses=
|
||||||
Unlimited uses=
|
Unlimited uses=
|
||||||
|
Durability: @1=
|
||||||
|
|
|
@ -107,3 +107,8 @@ tt.register_snippet(function(itemstring)
|
||||||
end
|
end
|
||||||
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", S("@1 uses", mcl_util.calculate_durability(itemstack or ItemStack(itemstring))))
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
Loading…
Reference in New Issue