How to make player immune to projectiles?

Started by Ob1-KaDopey on

Topic category: Help with modding (Java Edition)

Last seen on 00:30, 14. May 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make player immune to projectiles?

I have a set of armor that when the player is under half health the set of armor changes, (which works just fine) but I want the armor to deflect or destroy projectiles that get shot at it.

 

I have tried de-spawning the arrow entity when in a square space of x, but this just crashes my game.

 

Any ideas?

Last seen on 12:15, 30. Jul 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is an option to…
Thu, 06/29/2023 - 14:46

there is an option to disable projectiles

Last seen on 00:30, 14. May 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Where would i find this?
Thu, 06/29/2023 - 14:48

Where would i find this?

Last seen on 12:15, 30. Jul 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh wait nvm my knowlage isnt…
Thu, 06/29/2023 - 14:49

oh wait nvm my knowlage isnt so good so i would just make the

entity interator
and in it you can delete the projectiles

Last seen on 12:15, 30. Jul 2024
Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
but im not sure about how to…
Thu, 06/29/2023 - 14:49

but im not sure about how to delete the arrows

Last seen on 00:30, 14. May 2024
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay for now I just have the…
Thu, 06/29/2023 - 15:07

Okay for now I just have the armor enchant itself with really high levels of projectile protection.

Last seen on 17:52, 22. Jul 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You just need to do a logic…
Mon, 04/01/2024 - 19:22

You just need to do a logic in where if the attack you receive is an arrow or a projectile, just cancel the event that triggered it. That does so arrows bounce off you and other projectiles will get destroyed if they cannot bounce away. Hope it helps

Last seen on 02:44, 8. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mariano Argüello could you…
Sun, 04/14/2024 - 12:27

Mariano Argüello could you give an example? i want to do something exactly like this and cant figure it out