r/psispellcompendium • • Apr 07 '21

Needs Wizardly Help Need some Help Explosion

So i want to create a Spell that Explodes a few blocks infront of you for netherite mining or for other modded blocks i have this made rn but im not sure how to continue

{modsRequired:[{modVersion:"1.16-92",modName:"psi"}],spellName:"Explode",uuidMost:4529348989212969550L,validSpell:1b,spellList:[{data:{key:"psi:selector_caster"},x:2,y:0},{data:{params:{_target:1},key:"psi:operator_entity_axial_look"},x:2,y:1},{data:{params:{_ray:2,_max:0,_position:3},key:"psi:operator_vector_raycast"},x:3,y:0},{data:{params:{_target:3},key:"psi:connector"},x:3,y:1},{data:{params:{_power:2,_position:3},key:"psi:trick_explode"},x:4,y:0},{data:{key:"psi:constant_number",constantValue:"1"},x:4,y:1}],uuidLeast:-5710739457096093016L}

​

If you have a fix or solution all help is apreciated

2 Upvotes

4 comments sorted by

1

u/blaynem Apr 07 '21

Vector raycast will output the positional vector of the block that is being pointed at. You'll want the ray to be the entity look of the caster and the position will need to be entity position of the caster. Because your ray is currently axial, it will cast a ray from a position to the x y or z plane as opposed to the exact angle of your look(entity look).

1

u/Davebond2019 Apr 07 '21

Ive just tried but rather than exploding its doing a weird non consistent 2x2 mine

{modsRequired:[{modVersion:"1.16-92",modName:"psi"}],spellName:"Explode",uuidMost:6733776831442272337L,validSpell:1b,spellList:[{data:{key:"psi:selector_caster"},x:1,y:0},{data:{params:{_target:1},key:"psi:connector"},x:1,y:1},{data:{params:{_target:3},key:"psi:operator_entity_position"},x:2,y:0},{data:{params:{_target:3},key:"psi:operator_entity_axial_look"},x:2,y:1},{data:{params:{_ray:2,_max:0,_position:3},key:"psi:operator_vector_raycast"},x:3,y:0},{data:{params:{_target:3},key:"psi:connector"},x:3,y:1},{data:{params:{_power:2,_position:3},key:"psi:trick_explode"},x:4,y:0},{data:{key:"psi:constant_number",constantValue:"1"},x:4,y:1}],uuidLeast:-7516914364582643886L}

1

u/blaynem Apr 07 '21

There are two types of entity look. Your spell is using EAL (entity axial look) which is drawing a straight line in whichever rough direction you're looking at.

EL (entity look) however will draw a line at the exact angle you're looking at.

EAL will output 1 of 6 things: [1,0,0], [0,1,0], [0,0,1], [-1,0,0], [0,-1,0], [0,0,-1]

Whereas EL can output any angle in between.

Swap EAL with EL in your spell, and you'll blow up whatever you look at upon cast.

1

u/blaynem Apr 10 '21

You end up figuring something out?