本帖最后由 Shadowrat 于 2022-4-23 09:42 编辑
多人游戏情况可能略微不理想,原因参见shower.mcfunction第三行和第五行其实这个包可以弄理想化一点,但我是孙吧懒狗
basic.rar
(1.22 KB, 下载次数: 24)
复制代码
功能跟站内某数据包贴有些雷同,但数据包完全是自己做的。
命令参考Minecraft维基,所以理论上1.16.5以上的版本都可以使用
数据包具体的内容就是
每十分钟天降陨石雨两分钟带播报
调整了一下变得理想化了起来

Download:
shower.function里的注释:
- scoreboard objectives add shower_time dummy
- #创建一个名为"shower_time"的计分板
- scoreboard players add delay shower_time 1
- #每一tick给shower_time计分板下的"delay"玩家+1
- execute at @a if score delay shower_time matches 12000 run summon armor_stand ~ ~ ~ {Invisible:true,Marker:true,Invulnerable:true,NoGravity:1b,Tags:["shower_aim"]}
- #当"delay"的shower_time计分板值为12000时召唤带有陨石流标签的盔甲架
- execute if score delay shower_time matches 12000 run tellraw @a ["","[",{"text":"公告","color":"yellow"},"]",{"text":"陨石群开始朝这里袭来了!","color":"red"}]
- #当"delay"的shower_time计分板值为12000时播报陨石群来袭公告
- execute if score delay shower_time matches 12000..14400 at @r run spreadplayers ~ ~ 4 80 false @e[nbt={Tags:["shower_aim"]}]
- #当"delay"的shower_time计分板值为12000到14400区间时每一tick将盔甲架分散到玩家附近80码范围内
- execute if score delay shower_time matches 12000..14400 as @e[nbt={Tags:["shower_aim"]}] at @s run tp ~ 160 ~
- #当"delay"的shower_time计分板值为12000到14400区间时每一tick将盔甲架分散到玩家附近80码范围内并在y=160的上空
- execute if score delay shower_time matches 12000..14400 at @e[nbt={Tags:["shower_aim"]}] run summon fireball ~ ~ ~ {power:[0.0,-0.1,0.0],ExplosionPower:2,Motion:[0.0,0.0,0.0],Tags:["shower"]}
- #当"delay"的shower_time计分板值为12000到14400区间时每一tick将盔甲架分散到玩家附近80码范围内并在y=160的上空并发射朝下加速度为0.1,威力为2的火球
- execute if score delay shower_time matches 14400.. run tellraw @a ["","[",{"text":"公告","color":"yellow"},"]",{"text":"陨石群似乎已经消停了..","color":"red"}]
- #当"delay"的shower_time计分板值为14400时播报陨石群结束公告
- execute if score delay shower_time matches 14400.. run kill @e[nbt={Tags:["shower_aim"]}]
- #移除所有带有陨石群召唤标签的盔甲架
- execute if score delay shower_time matches 14400.. run scoreboard players set delay shower_time 0
- #清零计数,每一秒20tick,则上述命令的表达为:每十分钟开始一次陨石群来袭活动,持续两分钟,到十二分钟时结束陨石群,并将时间重置
没有展示图和教程吗