ImmersiveMC

ImmersiveMC

2M Downloads

Blocked Arrows Still Hurt After Landing on Ground

hammy275 opened this issue ยท 2 comments

commented

https://discord.com/channels/1061675558347489343/1165752660960477259/1165752660960477259

After blocking an arrow, walking into it will still hurt you!

commented

Based on https://discord.com/channels/1061675558347489343/1165752660960477259/1191821292081520700 , it seems what happens is:

  1. Arrow is reflected and lands on ground normally
  2. Arrow on ground is reflected again
  3. Doubly-reflected arrow causes damage to the player

EDIT: The above isn't necessarily the case.

commented

New theory:

There are two parts to the shield, the angle blocking and the projectile blocking. The former blocks everything (projectiles included) when damage is taken in a 60 degree angle, similarly to vanilla. This isn't the issue from this theory.

The projectile blocking looks for projectiles in the shield hitbox and calls its onHit once the hitbox intersects. This would in theory pick up projectiles on the ground, hence my thought that it may be the issue at hand.

The easiest solution would be to remove the projectile blocking entirely, which only causes the downside that if the shield is held outside the player's hitbox, then it won't be blocked. May actually try to refine it instead, though, such as not calling the method if the projectile is in the ground or if it has zero velocity.