Get all entities with custom effect

Started by zerosevenine on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Dec 2021
Points:
523

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
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
Active 1 month ago
Joined Nov 2020
Points:
1014

User statistics:

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

this works but you NEED to right click on an entityImage

Active 1 month ago
Joined Nov 2020
Points:
1014

User statistics:

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

any entity not just one with the effect

Active 2 years ago
Joined Dec 2021
Points:
523

User statistics:

  • Modifications: 0
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
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?

 

Active 1 week ago
Joined Aug 2018
Points:
781

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 124
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.