✅能力条件
能力条件用于决定触发器、能力修改器或能力能否继续执行。普通的 conditions 映射使用逻辑 AND(与):其中每个具名子条件都必须匹配。
EnchantmentReform 注册了 74 个内置条件键,本参考文档会对它们进行说明。
参考页面
通用格式
conditions:
unique-entry-id:
type: health_percent
target: TARGET
max: 50
not: false通用字段
type
必填
已注册的条件键。键不区分大小写,且 - 会被规范化为 _。
not
false
反转该条件最终返回的结果。
target
由类型决定
当条件实现提供实体选择器时,可使用 SOURCE、SKILL 或 TARGET 等选择器。
meet-message
空
条件匹配时,可选择向解析出的玩家发送消息。
not-meet-message
空
条件不匹配时,可选择发送消息。
当条件所需的实体、物品、方块、位置、事件或可修改结果不存在时,该条件会返回 false。各分类页面会说明每种条件所需的确切上下文,以及其支持的所有专用字段。
检查时机
触发器层级的条件会在能力修改器和能力之前执行。附加在某个能力修改器或能力上的条件,则会在执行到该条目时检查。因此,读取结果的条件可以观察同一触发器部分中更早执行的能力修改器所产生的变化。
类型索引
any
not
random
player_conditions
headshot
height
sneaking
not_sneaking
health
health_percent
has_potion
distance
food_level
gliding
on_ground
in_air
match_entity
match_item
item_damage
catch_match_item
min_attack_cooldown
sprinting
potion_effect_type
effect_type
potion_effect_cause
potion_effect_action
ageable
first_attack_against_entity
first_attack_from_monster
first_monster_attack
target_category
fatal_damage
stationary
in_water
in_lava
liquid_surface_distance
liquid_transition
in_rain
in_sunlight
in_structure
light_level
clear_weather
storm
thunder
world
night
environment
block_type
block_type_offset
best_tool
preferred_tool
biome_changed
block_break_time
break_time
damage_value
damage_cause
damage_origin
spawn_reason
combust_duration
regain_amount
explosion_yield
explosion_radius
target_reason
interaction_action
input_type
event_state
food_change
air_change
state_value
combust_origin
knockback_cause
knockback_reason
exhaustion_reason
villager_trade
cooldown
cooldown_material
最后更新于