Entity Targeting

Started by ObscureBackdrop on

Topic category: Help with modding (Java Edition)

Last seen on 22:07, 1. Feb 2024
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Entity Targeting

I'm trying to make an item that when right-clicked adds slowness and mining fatigue to an entity that has a custom potion effect, but I can't get the program to target the mob that is affected by the custom potion effect.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
have you tried: Get Entity…
Thu, 09/16/2021 - 21:33

have you tried:

Get Entity Iterator in block radius 20 

   if Entity Iterator has Active Potion Effect: YOUR_EFFECT

      do Set Potion Effect TIME to Entity Iterator type: YOUR_EFFECT

   else

     do Send Message "No Entity Was Found" to Source Entity Show In Action Bar: True/False

Last seen on 00:31, 9. Dec 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and what if i want an entity…
Thu, 09/16/2021 - 22:10

and what if i want an entity to attack the player who has a diamond in his inventory? What conditions do i need?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well what you could try is…
Fri, 09/17/2021 - 00:24

well what you could try is set entities damage to default 0, and on a trigger that checks if the entity attacked a player, If player has Diamond in inventory, deal NUMBER_OF_DAMGE to player