whcwdsj
原方案:summon minecraft:armor_stand ~ ~1 ~ {Tags:["s18"],Invisible:1,Marker:1}

data modify entity @e[tag=s18,limit=1] Rotation set from entity @e[tag=26,limit=1] Rotation

execute as @e[tag=s18] at @s run tp @s ^ ^ ^2

execute as @e[tag=26] at @s anchored eyes run summon minecraft:fireball ~ ~1.5 ~ {Tags:["s19"],ExplosionPower:2}

data modify entity @e[tag=s19,limit=1] Motion set from entity @e[tag=s18,limit=1] Pos

5个红时刻后:

kill @e[tag=s18]



但火球只能呆在原地不动

tag=26为演示实体



Muggle2077
本帖最后由 Muggle2077 于 2022-12-20 12:25 编辑

以下命令可以使所有盔甲架都召唤一个 power 为 0.1,Motion 为 1.6 的向前运动的火球。

  1. execute as @e[type=minecraft:armor_stand] at @s anchored eyes positioned ^ ^ ^ run function foo:summon
复制代码


函数 foo:summon

  1. summon minecraft:fireball ~ ~ ~ {Tags:["fireball"]}
  2. summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["marker"]}
  3. execute as @e[type=minecraft:area_effect_cloud,tag=marker,distance=..0.01] positioned 0.0 0.0 0.0 run function foo:motion
复制代码

函数 foo:motion

  1. tp @s ^ ^ ^0.1
  2. data modify entity @e[type=minecraft:fireball,tag=fireball,limit=1] power set from entity @s Pos
  3. tp @s ^ ^ ^1.6
  4. data modify entity @e[type=minecraft:fireball,tag=fireball,limit=1] Motion set from entity @s Pos
  5. tag @e[type=minecraft:fireball,tag=fireball] remove fireball
  6. kill @s
复制代码

whcwdsj
Muggle2077 发表于 2022-12-20 12:12
以下命令可以使所有盔甲架都召唤一个 power 为 0.1,Motion 为 1.6 的向前运动的火球。

必选要用数据包?

钠钠钠镓
把第一条的~ ~1 ~改成0.0 0 0.0就行了
XZ必须是0.0,否则会自动对齐0.5
如有必要,还需要设置强加载区块
/forceload add -1 -1 1 1

whcwdsj
钠钠钠镓 发表于 2022-12-21 08:21
把第一条的~ ~1 ~改成0.0 0 0.0就行了
X和Z必须是0.0,否则会自动对齐至0.5
如有必要,还需要设置强加载区 ...

好的,我试试

第一页 上一页 下一页 最后一页