Get all entities with custom effect

Started by zerosevenine on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Get all entities with custom effect
Tue, 01/25/2022 - 21:55 (edited)

Hello!

I'm making a mod including cool, battle-used tools and weapons.
I'd like to make a weapon which would give a specific custom effect (which i already have, lets call it *) upon hitting an entity.
This effect wouldn't do anything on it's own, but here comes the twist - rightclicking this weapon will briefly weaken and slow everyone having this specific effect and noone else, not dependant on reach or such.

So in conclusion, the only thing i need to know, is if there is a way to get ALL entities having the effect * - and only better, if it would be possible to have these entities as sort of a variable or a tag.

Thanks beforehand.

Edited by zerosevenine on Tue, 01/25/2022 - 21:55
Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this works but you NEED to…
Wed, 01/26/2022 - 03:53

this works but you NEED to right click on an entityImage

Joined Nov 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
any entity not just one with…
Wed, 01/26/2022 - 03:54

any entity not just one with the effect

Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And isn't it possible to…
Wed, 01/26/2022 - 12:49

And isn't it possible to make it straight the way of "get all entities with effect"? Isn't there some sort of mod or procedure addon for this?

 

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can do it with the…
Wed, 03/02/2022 - 14:12

You can do it with the global trigger "On entity tick" or something like that. The procedure will be executed for every entity.