💪 动作
最后更新于
events:
interact:
action_1:
type: conditional
value:
conditions:
# 要求双手空着
requirement_1:
type: item-in-hand
value:
item: "AIR"
requirement_2:
type: item-in-hand
value:
hand: other
item: "AIR"
actions:
action_1:
type: break
value: true
action_2:
type: swing-hand
value: true
action_2:
type: conditional
value:
conditions:
requirement_1:
type: item-in-hand
value:
item: "customcrops:tomato_seeds"
amount: 1
actions:
action_1:
type: break
value: true
action_2:
type: swing-hand
value: true
action_3:
type: plant
value:
crop: tomato
point: 0
action_4:
type: item-amount
value: -1messages_action:
type: message
value:
- '<#FF4500>[1st] 恭喜!您获得了一等奖!'broadcast_action:
type: broadcast
value:
- '你好!'command_action:
type: command
value:
- 'money give {player} 200'command_action:
type: player-command
value:
- 'say 你好'command_action:
type: random-command
value:
- 'money give {player} 200'
- 'money give {player} 100'
- 'money give {player} 50'close_action:
type: close-invactionbar_action:
type: actionbar
value: '你好'actionbar_action:
type: random-actionbar
value:
- '嗨'
- '你好'
- '你妈'mending_action:
type: mending
value: 1tick_action:
type: force-tickswing_action:
type: swing-hand
value: true # true = 主手 | false = 副手exp_action:
type: exp
value: 1chain_action:
type: exp
value:
action_1: ...
action_2: ...
chance: 0.5delay_action:
type: delay
value:
delay: 20 # 以刻为单位
async: false # 是否异步运行
actions:
action_1: ...
action_2: ...timer_action:
type: timer
value:
async: false # 是否异步运行
duration: 20 # 以刻为单位
delay: 3 # 以刻为单位
period: 2 # 以刻为单位
actions:
action_1: ...
action_2: ...hologram_action:
type: hologram
value:
duration: 20
text: '{water_bar}'
apply-correction: true # 对每株作物应用高度校正
visible-to-all: false # 决定全息图是否能被所有玩家看到
range: 32 # 决定可见范围
y: 2
x: 0
z: 0fake_item_action:
type: fake-item
value:
duration: 25 # 刻
position: other # other/player
item: customcrops:water_animation
use-item-display: false # 需要1.19.4+
y: 0
x: 0
z: 0
visible-to-all: true
range: 32https://zh.minecraft.wiki/w/%E9%A5%A5%E9%A5%BF
food_action:
type: food
value: 2https://zh.minecraft.wiki/w/%E9%A5%A5%E9%A5%BF
saturation_action:
type: saturation
value: 1.5item_action:
type: give-item
value:
item: customcrops:tomato
amount: 10item_amount_action:
type: item-amount
value: -1
item_amount_action:
type: item-amount
value:
hand: main #main/off(这是一个可选参数)
amount: -1durability_action:
type: durability
value: -1
durability_action:
type: durability
value:
slot: OFF_HAND
amount: -1variation_action:
type: variation
value:
gigantic:
item: gigantic_tomato
type: BLOCK # BLOCK / FURNITURE
chance: 0.02
xxx:
item: xxx
type: BLOCK
chance: 0.07crop_action:
type: quality-crops
value:
to-inventory: false
min: 1
max: 4
items:
1: tomato
2: tomato_silver_star
3: tomato_golden_stardrop_action:
type: drop-item
value:
to-inventory: false
ignore-fertilizer: true
item: tomato_seeds
min: 1
max: 2plant_action:
type: plant
value:
crop: tomato # 配置 ID
point: 0break_action:
type: break
value: true # 是否触发 "break" 事件particle_action:
type: particle
value:
particle: FLAME
x: 0.5
y: 0.5
z: 0.5
count: 10
offset-x: 0.5
offset-y: 0.5
offset-z: 0.5
extra: 0.0
# 仅当粒子为 ITEM_CRACK 时有效
itemStack: customcrops:xxx
# 仅当粒子为 REDSTONE/DUST_COLOR_TRANSITION 时有效
color: 255,0,0
scale: 1
# 仅当粒子为 DUST_COLOR_TRANSITION 时有效
to-color: 0,0,255money_action:
type: give-money
value: 100.12money_action:
type: take-money
value: 50.54title_action:
type: title
value:
title: '<green>你好!</green>'
subtitle: '这是副标题!'
fade-in: 20
stay: 30
fade-out: 10title_action:
type: random-title
value:
titles:
- '<green>你好!</green>'
- '<green>嗨!</green>'
subtitles:
- '副标题 1'
- '副标题 2'
fade-in: 20
stay: 30
fade-out: 10sound_action:
type: sound
value:
key: 'minecraft:block.amethyst_block.place'
source: 'player'
volume: 1
pitch: 1potion_action:
type: potion-effect
value:
type: 'blindness'
duration: 20
amplifier: 0plugin_exp_action:
type: plugin-exp
value:
plugin: AureliumSkills
exp: 20
target: FARMINGconditional_action:
type: conditional
value:
conditions:
requirement_1:
...
requirement_2:
...
actions:
action_1:
...
action_2:
...priority_action:
type: priority
value:
priority_1:
conditions:
...
actions:
...
priority_2:
conditions:
...
actions:
...
others:
actions:
... money_action:
type: level
value: -10spawn_entity_action:
type: spawn-entity
value:
id: MythicMobs:XXX_mob # 对于原版实体,使用大写字母,例如"SHEEP"
x: 0
y: 0
z: 0
properties:
level: 0