原方案: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 于 2022-12-20 12:25 编辑
以下命令可以使所有盔甲架都召唤一个 power 为 0.1,Motion 为 1.6 的向前运动的火球。
复制代码
函数 foo:summon
复制代码
函数 foo:motion
复制代码
以下命令可以使所有盔甲架都召唤一个 power 为 0.1,Motion 为 1.6 的向前运动的火球。
- execute as @e[type=minecraft:armor_stand] at @s anchored eyes positioned ^ ^ ^ run function foo:summon
函数 foo:summon
- summon minecraft:fireball ~ ~ ~ {Tags:["fireball"]}
- summon minecraft:area_effect_cloud ~ ~ ~ {Tags:["marker"]}
- 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
- tp @s ^ ^ ^0.1
- data modify entity @e[type=minecraft:fireball,tag=fireball,limit=1] power set from entity @s Pos
- tp @s ^ ^ ^1.6
- data modify entity @e[type=minecraft:fireball,tag=fireball,limit=1] Motion set from entity @s Pos
- tag @e[type=minecraft:fireball,tag=fireball] remove fireball
- kill @s
Muggle2077 发表于 2022-12-20 12:12
以下命令可以使所有盔甲架都召唤一个 power 为 0.1,Motion 为 1.6 的向前运动的火球。
必选要用数据包?
把第一条的~ ~1 ~改成0.0 0 0.0就行了
X和Z必须是0.0,否则会自动对齐至0.5
如有必要,还需要设置强加载区块
/forceload add -1 -1 1 1
X和Z必须是0.0,否则会自动对齐至0.5
如有必要,还需要设置强加载区块
/forceload add -1 -1 1 1
钠钠钠镓 发表于 2022-12-21 08:21
把第一条的~ ~1 ~改成0.0 0 0.0就行了
X和Z必须是0.0,否则会自动对齐至0.5
如有必要,还需要设置强加载区 ...
好的,我试试