Limiting the target for entity iterator

Started by qym on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Mar 2022
Points:
605

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
Limiting the target for entity iterator

I was wondering is there a way to limit the target to only one while using the "for each entity as entity iterator at XYZ square cube size"?it usually targets all the entity nearby but i want it to target only one just like the Minecraft command "limit"

Active 7 months ago
Joined Mar 2022
Points:
557

User statistics:

  • Modifications: 1
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 67
Something like this? Might…
Thu, 10/06/2022 - 00:52

helping dude

Something like this? Might want to change the X Y Z to X position of event/target entity, but this procedure would do 1000 damage to only blazes near you. if you were surrounded with wither skeletons and magma slimes and blazes, it would only kill the blazes.

Active 1 year ago
Joined Mar 2022
Points:
605

User statistics:

  • Modifications: 0
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 31
not like this i meant like…
Sat, 10/08/2022 - 04:32

not like this i meant like the nearest entity but i want to make it able to target players too

Active 2 weeks ago
Joined Jun 2023
Points:
347

User statistics:

  • Modifications: 0
  • Forum topics: 17
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 48
Follow what the first guy…
Mon, 06/19/2023 - 22:37

Follow what the first guy said, just swap the "Entity iterator" tag in the "Deal damage" block to "Event/Target Entity" which should be the player depending on what is supposed to trigger this event in the first place.