約2か月前
(1)/execute as @e[type=snowball,tag=!processed,tag=!started] at @s rotated as @s positioned ^ ^ ^ if block ~ ~-4 ~ air if block ~ ~-3 ~ air if block ~ ~-2 ~ air if block ~ ~-1 ~ air if block ^ ^-1 ^ air run tag @s add started
(2)/execute as @e[type=snowball,tag=!processed,tag=started,tag=!TOE] at @s rotated as @s positioned ^ ^ ^ unless blocks ^ ^ ^ ^ ^ ^3 0 320 0 all run teleport @s ~ ~5 ~ ~ ~
(3)/execute as @e[type=snowball,tag=!processed,tag=started,tag=!TOE] at @s rotated as @s positioned ^ ^ ^ if entity @a[r=81,rm=1.1,ry=89,rym=-89,rx=89,rxm=-89,c=1] at @a[r=81,rm=1.1,ry=89,rym=-89,rx=89,rxm=-89,c=1] positioned ~0.5 ~1.01 ~0.5 run teleport @s ^ ^ ^0.3 facing ~ ~ ~
(4)/execute as @e[type=snowball,tag=!processed,tag=started,tag=!TOE] at @s rotated as @s positioned ^ ^ ^ if entity @a[r=81,rm=1.1,ry=89,rym=-89,rx=89,rxm=-89,c=1] at @a[r=4,rm=1.1,ry=89,rym=-89,rx=89,rxm=-89,c=1] positioned ~0.5 ~1.01 ~0.5 run tag @s add TOE
(5)/execute as @e[type=snowball,tag=!processed,tag=started,tag=TOE] at @s rotated as @s positioned ^ ^ ^ if entity @a[r=81,rm=1.1,ry=89,rym=-89,rx=89,rxm=-89,c=1] at @a[r=81,rm=1.1,ry=89,rym=-89,rx=89,rxm=-89,c=1] positioned ~0.5 ~1.01 ~0.5 run teleport @s ^ ^ ^0.25 facing ~ ~ ~
(6)/execute as @e[type=snowball,tag=!processed,tag=started,tag=TOE] at @s rotated as @s positioned ^ ^ ^ if entity @a[r=2.5,rm=0.5,ry=89,rym=-89,rx=89,rxm=-89,c=1] unless entity @e[r=2.5,type=ender_crytstal,tag=named] run kill @e[type=ender_crystal,tag=!named]
(7)/execute as @e[type=snowball,tag=!processed,tag=started,tag=TOE] at @s rotated as @s positioned ^ ^ ^ unless block ~ ~-1 ~ air unless blocks ^ ^ ^ ^ ^ ^1 0 320 0 all unless entity @e[type=ender_crystal,tag=named,r=2.5] run summon minecraft:ender_crystal ~ ~ ~ ~ ~ minecraft:crystal_explode {"tags":["named"]}
(8)/execute as @e[type=snowball,tag=!processed,tag=started,tag=TOE] at @s rotated as @s positioned ^ ^ ^ unless block ~ ~-1 ~ air unless blocks ^ ^ ^ ^ ^ ^1.5 0 320 0 all if entity @e[type=ender_crystal,tag=named,r=2.5] run tag @s add processed
[Version:NeteaseMCBE(by 2/June/2026),Something in addition:
There is something different between Bedrock edition owned by Netease and JE/BE version owned by Microsoft.
Netease has joined some parts of the command system(grammar) in JE and the system in BE together.]
这其中任何一个子命令或语句都有存在的意图,不要认为多余。任务——分别把每一个CB里对应的命令拆出,再分析每一个的子命令的左右,列出来详解(即分析全体)
部分思路:为了防止误伤使用者,不索敌rm=1.1内,
但这意味着敌人最终也随着雪球的靠近进入安全区(rm=1.1)。于是扔向高处激活,由于发射者人大概率站在地上,所以难以被误炸。
又由于索敌时雪球在空中(激活索敌条件),而敌人在地上,所以y雪球越靠近敌人越接地,那么y小于1则触发引爆(地面不是空气,那么unless block ~ ~-1 ~ air ...)。
由于雪球的使用场景是空旷场合(如平原),那么敌人可能放置障碍,但不可能从高处的空气向实心地面放置(放方块必须有凭靠,否则只能setblock之类),只能是由地面至高空搭出障碍,那么就一定能从上方越过(再不济也有限高)。
设雪球与竖直于地面的理想障碍物(即一根柱子,这里是解释原理)的z轴距离是d(本地坐标的的z是雪球指向facing之玩家的方向),与它的水平距离是a,而俯角(facing玩家—敌人时,雪球朝向的延长线地面产生的夹角是B,故1gt移动0.3blocks的雪球最远可以在障碍离自己3个横坐标开外作出应对。
由于在预警之后每向前0.3blocks意味着向上teleport5blocks规避,此时B减小(1gt地面的目标几乎未移动,近似静止),那么依据d=a/cosB,B越大而z轴上的距离也会稍微被拉大,那么雪球要经过比3blocks÷0.3blocks/gt=10gt=0.5s更多的时间撞上障碍,那么可以作出超过10次的teleport @s ~ ~5 ~规避,那么向上躲避大于10×5blocks=50blocks]