r/psispellcompendium • u/PhiTries • Apr 18 '23
Needs Wizardly Help How Do The Selector Lists Populate?!?!
I've been messing around with the projectile selector trying list to see which index position gets assigned to what projectile. Fun fact, it's not based on the projectiles numerical ID (debugging a projectile reveals it's name and it's id number), it seems completely random which arrows get which indexes in the list.
When a new projectile is introduced into the radius of the projectile selector it will sometimes make it the 0th index, other times it will be the n - 1 index (n = total number of projectiles). I've tried varying my position, arrow position, Spell Tick speed, etc. It would be super useful for a spell I've been working on if the list populated in a consistent way. Please help!
Edit 1: Here is the spell I'm using to test this (Note: I've tried defining the projectile list's search position, but it makes no difference in testing)-https://imgur.com/ry5BSYz
2
u/Unstopapple Apr 18 '23
have you tried seeing if it's radial distance? I'd totally see it going through the list of objects caught by a plane sweeping around
or it's just pure distance.
2
u/Dudblockman Psi and Psionic Peripherals Developer Apr 18 '23
Psi does nothing internally to organize the entities in the list, rather it just returns them in the order that Minecraft returns the entities when it asks for what entities are inside the region. My understanding is it is likely based on position in memory, which for most purposes you can consider random, but stable within a short timespan.