(Solved) Finding entity from its NBT

Started by sMarthz on

Topic category: Help with modding (Java Edition)

Last seen on 07:36, 20. Apr 2023
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Solved) Finding entity from its NBT
Tue, 11/02/2021 - 10:13 (edited)

I'm trying to make a sword that leaves something like a NBT tag to an entity so I can 'right-click' it between the next second and the next 10 seconds to stop the entity's movement, but I can't find a way of finding the entity I tagged in another procedure. Maybe something like "get entity with NBT 'paralyze'"? If I use "Get nearest entity at x y z in square of 30" and there's another entity of that type a little bit further away I won't be able to paralyze them!

As far as I know you can only call for NBT tag's content. Hope someone finds a solution!

Setting NBT tag when attacked: https://imgur.com/mSX1Wjs
Trying to paralyze it (it works but not if there's another of the same type even closer): https://imgur.com/BoKZr5Z

Edited by sMarthz on Tue, 11/02/2021 - 10:13
Last seen on 07:36, 20. Apr 2023
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just used "For each entity…
Tue, 11/02/2021 - 10:13

I just used "For each entity as entity iterator" in a radius of X and look for the one that its NBT name is the same as the one i'm looking for.