跳到主要内容

世界动作

改变世界:打雷、生怪、放方块。这一页的 10 种类型在编辑器的「世界」分类里。

例子​

走到祭坛时落雷、召唤三只带标签的骷髅,打完再清场:

plugins/StarQuest/quests/示例/祭坛守卫.yml
format: 1
id: 祭坛守卫
name: '&5祭坛守卫'
category: 示例
icon: LIGHTNING_ROD
settings:
start: {command: true}
repeat: {mode: unlimited}
nodes:
开始:
type: start
x: 0
y: 100
next: [召唤]
召唤:
type: action
x: 260
y: 100
actions:
- {type: lightning, damage: false}
- {type: spawn, entity: SKELETON, amount: 3, name: '&5祭坛守卫', tag: 祭坛守卫}
next: [战斗]
战斗:
type: objective
x: 520
y: 100
track-text: 击败祭坛守卫
time-limit: 5m
goals:
- {type: kill, entity: [SKELETON], tag: 祭坛守卫, amount: 3, display: '击败祭坛守卫 {progress}/{amount}'}
timeout: [超时]
next: [完成]
超时:
type: end
x: 780
y: 200
result: fail
actions:
- {type: remove-entities, entity: [SKELETON], tag: 祭坛守卫, range: 30}
完成:
type: end
x: 780
y: 40
result: complete

接任务的地方打下一道雷,三只头上写着「祭坛守卫」的骷髅出现。五分钟内打完任务完成;打不完任务失败,剩下的守卫被清掉。

落雷 lightning​

  • location(位置):不写 = 玩家所在
  • damage(造成伤害):默认 false,只有效果不伤人
- {type: lightning, location: 'world,105,64,-12'}

爆炸 explosion​

  • location(位置):不写 = 玩家所在
  • power(威力):默认 2(TNT 是 4)
  • break(破坏方块):默认 false
  • fire(起火):默认 false
- {type: explosion, power: 1.5}

生成生物 spawn​

生成原版生物。

  • entity(生物):必填,例如 ZOMBIE
  • amount(数量)
  • location(位置):不写 = 玩家所在
  • name(名称):头上显示的名字,可以写变量
  • tag(加上 scoreboard 标签):配合「击杀生物」的 tag 只算这批
- {type: spawn, entity: WOLF, amount: 2, name: '&7{player} 的猎犬'}

生成 MythicMobs mythic-spawn​

需要 MythicMobs。

  • mob(MythicMobs ID):必填
  • amount(数量)
  • level(等级):默认 1
  • location(位置):不写 = 玩家所在
- {type: mythic-spawn, mob: 寒风圣王, level: 30, location: 'world,500,80,500'}

施放 MythicMobs 技能 mythic-skill​

以玩家为施法者施放 MythicMobs 技能,做过场特效很好用。需要 MythicMobs。

  • skill(技能 ID):必填
- {type: mythic-skill, skill: 星辰降临特效}

放置方块 set-block​

真的改掉那一格,所有人都看得到。

  • location(位置):必填
  • material(方块):必填
- {type: set-block, location: 'world,105,64,-12', material: AIR}

假方块 fake-block​

只对这位玩家显示的方块,适合任务门、隐藏通道。

  • location(位置):必填
  • material(方块):必填
- {type: fake-block, location: 'world,110,64,-12', material: AIR}

世界时间 time​

改整个世界的时间。

  • mode(操作):set 设定(默认)、add 增加
  • time(时间,tick):默认 1000
  • world(世界):不写 = 玩家所在的世界
- {type: time, mode: set, time: 13000}

世界天气 weather​

  • weather(天气):clear 晴(默认)、rain 雨、storm 雷雨
  • duration(持续):默认 10m
- {type: weather, weather: storm, duration: 3m}

清除生物 remove-entities​

清掉一定范围内的生物,玩家不会被清。

  • entity(生物):可写多个,不写 = 任意
  • mythic(MythicMobs ID):写了就只清这种 MythicMobs 怪
  • range(半径):默认 10 格
  • location(中心):不写 = 玩家所在
  • tag(只清有这个标签的)
- {type: remove-entities, mythic: 寒风圣王, range: 50}

会踩的坑​

remove-entities 不写 entity、mythic、tag 时会把范围里所有生物清掉,包括别人的宠物、村民、盔甲架。一定要带条件。

假方块只是画面,玩家重新进服、区块重新载入,或点一下那格,就会变回真的方块。当门用时,过场结束就要让玩家离开那里。

time、weather、set-block 会影响同一世界的所有人。只想改一个人的画面,用上面的 fake-block,或 玩家动作 的 player-time、player-weather。

0:000:00