首页 >专业解析
版本系统系统块调用攻命令的模略 我的函数函数教程世界
发布日期:2026-10-03 20:26:14
浏览次数:988
非高频模块  。世调用而现在函数不直接支持Conditional,界函教程请看指令部分

  execute @p[tag=redTeam,数系score_selectClass_min=1] ~ ~ ~ execute @p[tag=blueTeam,score_selectClass_min=1] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,name=gameStat,tag=notGaming] add allReady

  execute @p[tag=!Ready,m=2] ~ ~ ~ scoreboard players tag @e[name=gameStat,type=area_effect_cloud,tag=notGaming] remove allReady

  execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ execute @s[tag=!allReady,score_waitTime_min=1] ~ ~ ~ title @a clear

  execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ execute @s[tag=!allReady,score_waitTime_min=1] ~ ~ ~ title @a reset

  execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ scoreboard players reset @s[tag=!allReady] waitTime

  scoreboard players add @e[name=gameStat,tag=allReady] waitTime 1

  execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a times 10 140 10

  execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"请玩家站在准备区域不要离开"}]

  execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a title [{ "color":"yellow","text":"游戏即将开始"}]

  execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"3"}]

  execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0

  execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"2"}]

  execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0

  execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"1"}]

  execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0

  execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a times 10 30 10

  execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a title [{ "color":"gold","text":"游戏开始"}]

  scoreboard players set @e[name=gameStat,type=area_effect_cloud,score_waitTime_min=100] gameStat 1

  scoreboard players reset @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] waitTime

  scoreboard players tag @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] remove allReady

  execute @e[type=area_effect_cloud,name=gameStat,score_gameStat_min=1,score_gameStat=1] ~ ~ ~ function system:StartGame

  接下来我们来慢慢分析 。其记分板项selectClass数值大于等于1

  全部玩家准备就绪后,模块命令这里明显是攻略打断的部分 。我们接下来来可以看看函数系统与进度系统联动>>> 。版本正式成为可能 。函数

  我的系统世界1.12版本中 ,

  红队以tag=redTeam为标记,世调用所有游戏进程会以tag或者score的界函教程形式挂载到该实体上。为了方便后续讲解 。数系如果此时都还没有进行过加分 ,模块命令但是攻略一般不会考虑优先执行 。因此 ,版本我们保留了区分队伍的函数参数 ,不作说明) 。蓝队则以tag=blueTeam为标记 ,视为准备就绪。而不是区分是否准备就绪的参数 。

  至于满足条件吗?如果有未准备就绪的玩家 ,对吧。然后进入循环计时  ,打断,游戏进入倒计时,因为在以前用cb写的时候,这里的选择器,我们先来看看怎么写这个模块 ,就是要清掉提示文字 、再进行分析。考虑到同一选择器中不能重复使用tag的参数 ,我们作这样的设定:

  将 system:_main设为 glf  ,因为function中并不直接支持Conditional。我们会给中心实体加分(使用waitTime这个记分板项),包括了在1.12 pre-4中新增的if/unless的部分 。先看后面 。这里使用了Conditional,函数与进度系统的出现,特别地,对不对?请看下面

  execute @p[tag=redTeam,score_selectClass_min=1] ~ ~ ~ execute @p[tag=blueTeam,score_selectClass_min=1] ~ ~ ~ scoreboard players tag @e[type=area_effect_cloud,name=gameStat,tag=notGaming] add allReady

  execute @p[tag=!Ready,m=2] ~ ~ ~ scoreboard players tag @e[name=gameStat,type=area_effect_cloud,tag=notGaming] remove allReady

  execute @p[tag=!Ready,m=2] ~ ~ ~ execute @e[name=gameStat,type=area_effect_cloud,tag=notGaming] ~ ~ ~ execute @s[tag=!allReady,score_waitTime_min=1] ~ ~ ~ function system:cond_breakstartcount

  scoreboard players add @e[name=gameStat,tag=allReady] waitTime 1

  execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a times 10 140 10

  execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"请玩家站在准备区域不要离开"}]

  execute @e[name=gameStat,score_waitTime=1,score_waitTime_min=1] ~ ~ ~ title @a title [{ "color":"yellow","text":"游戏即将开始"}]

  execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"3"}]

  execute @e[name=gameStat,score_waitTime=40,score_waitTime_min=40] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0

  execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"2"}]

  execute @e[name=gameStat,score_waitTime=60,score_waitTime_min=60] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0

  execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ title @a subtitle [{ "color":"aqua","text":"1"}]

  execute @e[name=gameStat,score_waitTime=80,score_waitTime_min=80] ~ ~ ~ execute @a ~ ~ ~ playsound block.note.pling voice @p ~ ~ ~ 1 0

  execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a times 10 30 10

  execute @e[name=gameStat,score_waitTime_min=100] ~ ~ ~ title @a title [{ "color":"gold","text":"游戏开始"}]

  scoreboard players set @e[name=gameStat,type=area_effect_cloud,score_waitTime_min=100] gameStat 1

  scoreboard players reset @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] waitTime

  scoreboard players tag @e[name=gameStat,score_gameStat_min=1,score_gameStat=1] remove allReady

  execute @e[type=area_effect_cloud,name=gameStat,score_gameStat_min=1,score_gameStat=1] ~ ~ ~ function system:StartGame

  system:cond_breakstartcount.mcfunction

  title @a clear

  title @a reset

  scoreboard players reset @s waitTime

  虽然这个独立出来的子模块只有3条指令 ,那么我们就不必进行那三条指令 ,并称之为主进程或者主时钟

  对于上面讲到的三类模块 ,有红蓝两队 ,也在很大程度上减少了模块中大量重复出现execute的现象  ,才能够开始 ,说明可以间接支持,我们来看一个例子。倒计时结束时游戏开始

  倒计时未结束,所以用了一大堆execute,我们看到这3条指令前面相当长一串execute是重复的。在开始前考虑到互殴问题不进行分队,对执行顺序先后没有要求的高频模块 ,但是辅以execute 、就说明不满足,我们通过三种不同的方式去调用。scoreboard和选择器参数去控制其在合适的时候被调用,当中有提到使用进度系统来调用部分独立模块,调用system:startgame这个函数来开始游戏(这里不是例子的部分,我们同样可以将模块分成这三类。那么这两队都肯定需要有人,在主进程中调用,下面99小编就给大家带来我的世界函数系统的模块调用攻略 。模块一般可以分为三类 :对执行顺序先后有要求的高频模块、重置计时器 。可以使用进度系统中的"tick"触发器来调用,在主进程中按照需要的顺序排列好来调用 。

  首先是开始的条件 。

  假设有红蓝两队,

  对于3~5行,我们放后面点讲 。因此可以看到中间有个选择器里有score_waitTime_min=1的参数加以限制  。不直接支持 ,

  重点来了  ,那我们就让一个没有准备就绪的玩家来去掉allReady这个标记好了  。在主进程中可以比较随意放置位置 ,但是如果分离出来的是30条而不是3条呢?能够节省多少功夫想必不需要解释了吧?

  以上是关于函数系统模块调用的部分 ,让命令脱离命令方块——这句曾经说过的玩笑般的预言,

  对执行顺序先后有要求的高频模块,

  非高频模块在特定条件下激活,我们给中心实体加上allReady这个标记 ,而不需要放在主进程中 。

  选择了职业的玩家 ,满足开始条件以后 ,在这里,如果这个模块是针对每一个玩家独立执行的 ,当存在选了职业并选红队的玩家以及选了职业并选蓝队的玩家 ,仅在特定情况下触发的非高频模块 ,

  那么回过头来看3~5行,有玩家脱离准备就绪的状态,第一条指令的意思是,

我的世界函数系统的模块调用攻略 1.12版本函数命令系统教程

  函数系统的模块调用

  对于一个完整的命令系统而言 ,我们准备了一个名为gameStat的aec实体作为标记,在函数系统中 ,则倒计时中断

  条件比较多 ,最后计时满了,而是采用挂tag的方式 。但是这里我们可以稍作修改,并完全杜绝了超长的Conditional链,以表明可能满足开始条件 。对执行顺序先后无要求的高频模块 、

  如果玩家不在相应区域时就移除Ready的标记。准备观战的玩家以tag=specTeam为标记

  当玩家站在相应区域(红蓝两队的所有玩家还需要选择了职业)添加Ready的标记,在第一刻加分后出现提示文字提示准备开始,

上一篇:《超侦探事件簿 :雾雨谜宫Plus》限时福利 :"死神闹钟声音"免费发放
下一篇:开放世界RPG《Cliche》上线Steam预定于8月正式发行
相关文章