问题:如何让弹射物变成火球并继承弹射物的朝向
1.14方案(非原创):
execute as @e[type=snowball] at @s run summon minecraft:fireball ~ ~ ~ {power:[0.0d,-0.05d,0.0d],direction:[0.0d,0.0d,0.0d],ExplosionPower:4}
execute as @e[type=snowball] at @s store result entity @e[distance=..1,limit=1,type=fireball] direction[0] double 0.001 run data get entity @s Motion[0] 1000
execute as @e[type=snowball] at @s store result entity @e[distance=..1,limit=1,type=fireball] direction[1] double 0.001 run data get entity @s Motion[1] 1000
execute as @e[type=snowball] at @s store result entity @e[distance=..1,limit=1,type=fireball] direction[2] double 0.001 run data get entity @s Motion[2] 1000
kill @e[type=minecraft:snowball]
(以上命令全部写入命令方块并设为高频)
该方案于1.16版本只能召唤竖直向下发射的火球,请问哪位大佬能修复问题或给出新方案
要求版本:1.16.5
本帖最后由 开心的阿诺 于 2022-7-21 14:35 编辑
execute as @e[type=minecraft:snowball] at @s run summon minecraft:fireball ~ ~ ~ {Tags:["summon"]}
execute as @e[type=minecraft:fireball,tag=summon] run data modify entity @s Motion set from entity @e[type=minecraft:snowball,sort=nearest,limit=1] Motion
kill @e[type=minecraft:snowball]
(加了一个tag防止影响到正常火球)
u1s1,还蛮好玩的(



(加了一个tag防止影响到正常火球)


开心的阿诺 发表于 2022-7-21 14:33
execute as @e[type=minecraft:snowball] at @s run summon minecraft:fireball ~ ~ ...
不错,但是得在火球的NBT里加个power:[0.0d,-0.05d,0.0d],不然飞着飞着就定住了
whcwdsj 发表于 2022-7-21 15:26
不错,但是得在火球的NBT里加个power:[0.0d,-0.05d,0.0d],不然飞着飞着就定住了 ...
忘记火球没有加速度了(