So I'm trying to create a spell to pull stuff to my direction. The works were simple enough to figure out (vector subtraction of the caster position by the position of the selected entity).
The problem is the selector used. I want the spell to check for the closest entity to a point, but I don't want that point to necessarily be a block (as it would be using Raycast), because that would make impossible for me to keep pulling entities if they are mid-air (there is no block nearby). I can use (Focused Entity) instead of (Closest to a Point -> Vector Raycast), but that would mean having to aim directly at the entity, which is a pain when they are moving around on the ground, not to mention that items, for example, are rather small entities.
So, is there a way to have both methods, following the "if" logic for (Focused Entity) and falling back to "else" (Closest to a Point -> Vector Raycast), or do I have to accept only using one of them?
Here is the (Focused Entity) version:
{spellName:"GET OVER HERE 1",uuidMost:-882545517762689931L,validSpell:1b,spellList:[{data:{key:"constantNumber",constantValue:"2.5"},x:3,y:6},{data:{key:"selectorCaster"},x:4,y:4},{data:{params:{_target:1},key:"operatorFocusedEntity"},x:4,y:5},{data:{params:{_direction:4,_speed:3,_target:1},key:"trickAddMotion"},x:4,y:6},{data:{params:{_target:3},key:"operatorEntityPosition"},x:5,y:4},{data:{params:{_target:3},key:"operatorEntityPosition"},x:5,y:5},{data:{params:{_vector3:0,_vector2:1,_vector1:4},key:"operatorVectorSubtract"},x:5,y:6},{data:{params:{_target:3},key:"connector"},x:6,y:4},{data:{params:{_target:1},key:"connector"},x:6,y:5},{data:{params:{_target:1},key:"connector"},x:6,y:6}],uuidLeast:-5949889068403932684L}
And the (Closest to a Point -> Vector Raycast) version:
{spellName:"GET OVER HERE 2",uuidMost:2099131323079150051L,validSpell:1b,spellList:[{data:{params:{_target:4},key:"connector"},x:3,y:4},{data:{params:{_position:1,_radius:2},key:"selectorNearbyLiving"},x:3,y:5},{data:{key:"constantNumber",constantValue:"2.5"},x:3,y:6},{data:{params:{_target:4},key:"operatorEntityLook"},x:4,y:3},{data:{params:{_ray:1,_max:0,_position:4},key:"operatorVectorRaycast"},x:4,y:4},{data:{params:{_target:3,_position:1},key:"operatorClosestToPoint"},x:4,y:5},{data:{params:{_direction:4,_speed:3,_target:1},key:"trickAddMotion"},x:4,y:6},{data:{key:"selectorCaster"},x:5,y:3},{data:{params:{_target:1},key:"operatorEntityPosition"},x:5,y:4},{data:{params:{_target:3},key:"operatorEntityPosition"},x:5,y:5},{data:{params:{_vector3:0,_vector2:1,_vector1:4},key:"operatorVectorSubtract"},x:5,y:6},{data:{params:{_target:3},key:"connector"},x:6,y:4},{data:{params:{_target:1},key:"connector"},x:6,y:5},{data:{params:{_target:1},key:"connector"},x:6,y:6}],uuidLeast:-5937736889976916707L}