I have created a datapack that allows me to shoot arrows at a firerate of 20 shots/second. However I learned that there is a small invincibility frame of approximately 0.5 second everytime a mob gets hit, rendering my weapon's high firerate completely useless. I have tried setting the {HurtTime} tag to 0s with execute as @e run data modify entity @s HurtTime set value 0s, but it won't work. I acknowledge that I can achieve this by using mods but I want to know if there is a way to remove this invincibility frame using in game commands.
Mob Invincibility after being hit
1.2k views Asked by hfanatic At
1
You can try multiple ways :
With code. You have the same question with code here
Edit your command (Info) to :
Another code edit: use
entity.setNoDamageTicks(0)or something like thatIf nothing works, you should ask it on Arqade