Need help with detecting entities

Started by Taguysy on

Topic category: Advanced modding

Last seen on 10:32, 30. Mar 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help with detecting entities

I'm creating item that give effect to entities in 3x3 area with player in center. Procedure should detect entity in one block radius from player and then give effect. I tried to do this via coordinates block ( if entity position = x, and entity position = y, and entity position = z do add potion effect etc. for others coords) but that doesn't work. Is it any workable method to do this? Because I search forum and didn't find anything.

Last seen on 10:32, 30. Mar 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hm, I solve the problem in…
Sun, 03/15/2020 - 23:26

Hm, I solve the problem in funny way, shortly describe.
I start from creating new entity - invisible one XP chiken without AI, sounds, colithion model etc. Then I create two procedures:
First one - when chick collision with player model - it give effect, second - on entity tick it damage chick by one XP.
Then I come to my item, in item procedures I spawn 10 chicks, one on summoner and 9 around him in circle. 

So, now when player press RMB - item summon 10 chicks, that give buff to any player in 3x3 radius and than instantly die (F to fallen heroes). I continue my test, but seems it not affect on FPS, if  only you don't spawn handreds of it by accident (yeap, that was funny, but drop my FPS to zero).

If somebody want guide about this litle kludge - write here and I'll describe in details.