Help: custom mob that won't attack players with a specific effect

Started by cragdyna on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help: custom mob that won't attack players with a specific effect

I'm trying to create an entity that won't attack a player when they have a specific potion effect on them. But will target every other player 

I need the procedure to be on the entity since the player with the potion effect will be riding the entity.

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
cool idea uhhh go to the…
Thu, 09/11/2025 - 20:05

cool idea

uhhh go to the entity ai tasks tab, then for the attack players block, find the "Conditions: ∞" dropdown, click on it, then set both of the conditions to create a new condition procedure that checks if the event/target entity has your custom potion effect then return true, otherwise return false