Topic category: Help with modding (Java Edition)
(firstly I'm sorry for my bad english you guys can asl if don't understand the problem.)
I'm working on a enchantment that deals damage like chain.
When bow has this enchanment, when i hitted entity it will give a custom potion effect named "shocked". I want to spread this potion effect to nearest entity.
A chain that spreading to those around it one by one. And since I want it to proceed in a "chain" manner, I do not want to use the "For each entity in square cube" procedure, which covers all the targets around. And at the same time, "nearest entity (living entity)" only marks itself.
How can i detect nearest entity without the entity i attacked with arrow? also I don't know coding so I need to do this in "procedure"
If you guys know plugin will can solve this problem, i can use.
Try doing "For each entity in square cube", and detect the distance yourself, but exclude the main entity?
you can always just remove 1 from the entity count so as to not count itself.
OR If you're working with other functions w/ entity detection just, check if the entity count >1 to start executing
You could also execute whatever you wanted to execute on all the entities and then remove those stuffs from the main entity(itself)
pardon my language, it's pretty late and I'm half-asleep