I think there could be an attack dummy or scarecrow crafted from hay bales, wool, and sticks
When you hit the attack dummy or scarecrow with a sword, axe, trident, or any weapon it will act like a mob, but cannot move and dosent take knockback. It plays a little animation instead when you hit it and depending on how hard the hit was the more it sways. Arrows will stick inside of it like how players get arrows stuck in them, the scarecrow also is effected by channeling, flame, and fire aspect.
But whenever you hit the scarecrow a little number showing how much damage you dealt pops out. So you can see how much damage you can deal.
The attack dummy can also give out a redstone signal if you hit it with a melee attack
And the signal can scale with damage done to it.
To break a dummy you need to mine the bottom part with any tool which will take a few seconds