When the entity attacks the player it gives potion effect even if player wearing a shield

Started by carlos13 on

Topic category: Help with modding (Java Edition)

Last seen on 04:09, 15. Feb 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When the entity attacks the player it gives potion effect even if player wearing a shield

Hi, im working on a entity that gives weakness and blindness when attacks, it worked very well at first but I noticed that when I (the player) tried to block the attack with a shield, it still gives me potion effects. Then I create a procedure with the  "Entity Blocks With Shield" global trigger, but it seems the "Entity Attacked" trigger always overwrite the shield procedure and then continues to give potion effects to the player... How I suppose to do that? 

 

Heres a print of my procedure

print

Last seen on 03:15, 26. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if entity attacked is source…
Sun, 02/18/2024 - 01:12

if entity attacked

is source entity (the entity you want)

give potion effect blindness or anything else) to event/target entity