|
|
CHANGED MINECRAFT:VILLAGER_TRADE
更改了 MINECRAFT:VILLAGER_TRADE
- The villager field now accepts an inline value or a namespaced ID of a minecraft:predicate type
- villager 字段现在接受一个内联值或 minecraft:predicate 类型的命名空间 ID
SLOT SOURCES
槽位源
- Slot sources can now be defined as files inside a Data Pack, within the slot_source folder
- 槽位源现在可以在数据包内定义为文件,位于 slot_source 文件夹中
- Can be used in commands which take slot sources as arguments
- 可在接受槽位源作为命令参数的命令中使用
- minecraft:contents is no longer restricted to only selecting non-empty slots
- minecraft:contents 不再仅限于选择非空槽位
CHANGED MINECRAFT:GROUP
更改了 MINECRAFT:GROUP
- The terms field now accepts an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:slot_source type
- terms 字段现在接受一个内联值、命名空间 ID、命名空间 ID 列表、内联值列表,或 minecraft:slot_source 类型的以 # 为前缀的标签 ID
- The inline format of minecraft:group (previously only a list of inline slot sources) can now also accept a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:slot_source type
- minecraft:group 的内联格式(之前仅为内联槽位来源的列表)现在还可以接受命名空间 ID 的列表、内联值的列表,或一个 minecraft:slot_source 类型的以 # 为前缀的标签 ID
- This format is now consistently available for all fields of a slot source (but not for stand-alone files)
- 该格式现在已能一致地用于槽位来源的所有字段(但不适用于独立文件)
CHANGED MINECRAFT:FILTERED
更改了 MINECRAFT:FILTERED
- The slot_source field now accepts an inline value or a namespaced ID of a minecraft:slot_source type
- slot_source 字段现在接受一个内联值或 minecraft:slot_source 类型的命名空间 ID
CHANGED MINECRAFT:CONTENTS
更改了 MINECRAFT:CONTENTS
- The slot_source field now accepts an inline value or a namespaced ID of a minecraft:slot_source type
- slot_source 字段现在接受一个内联值或 minecraft:slot_source 类型的命名空间 ID
CHANGED MINECRAFT:LIMIT_SLOTS
更改了 MINECRAFT:LIMIT_SLOTS
- The slot_source field now accepts an inline value or a namespaced ID of a minecraft:slot_source type
- slot_source 字段现在接受一个内联值或 minecraft:slot_source 类型的命名空间 ID
CHANGED MINECRAFT:SLOT_RANGE
更改了 MINECRAFT:SLOT_RANGE
- The source field has a new valid type container, which sources slots from a container or inventory provided through loot context
- source 字段有一个新的有效类型 container,它从通过战利品上下文提供的容器或物品栏中获取槽位
- The source field is now optional
- source 现在是可选的
- Defaults to the container source type when absent
- 若该参数缺失,则默认使用 container
LOOT TABLES
战利品表
- Added till/rooted_dirt loot table for drops when Rooted Dirt is tilled with a hoe
- 加入了在使用锄刨去缠根泥土时till/rooted_dirt掉落物战利品表
- Multiple block loot tables now reference predicates for checking if a tool has Silk Touch and is Shears instead of inlining a copy of those checks
- 多个方块战利品表现在引用谓词来检查工具是否具有精准采集和剪刀的属性,而不是内联这些检查的副本
- The rolls field now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type
- rolls 字段现在接受内联值或一个 minecraft:context_int_provider 类型的命名空间 ID
- The bonus_rolls field now accepts an inline value or a namespaced ID of a minecraft:context_float_provider type
- The bonus_rolls 字段现在接受一个内联值或一个 minecraft:context_float_provider 类型的命名空间ID
LOOT TABLE TYPES
战利品表类型
ADDED MINECRAFT:COMMAND_SLOT_SOURCE
加入了 MINECRAFT:COMMAND_SLOT_SOURCE
- Currently used to evaluate slot sources with the /item and /execute commands
- 当前用于与 /item 和 /execute 命令一起检测槽位源
- It takes the following parameters:
- 它接受以下参数:
- container, the container or inventory being evaluated
- container, 目标容器或物品栏
- origin, the position at which the command was executed
- origin,执行命令时的位置
- this_entity, the @s entity of the command being executed (optional)
- this_entity,正在执行的命令的@s实体(可选)
ADDED MINECRAFT:COMMAND_COMPUTE_DEFAULT
加入了 MINECRAFT:COMMAND_COMPUTE_DEFAULT
- Currently used for the /compute default command
- 当前用于 /compute default 命令
- It takes the following parameters:
- 它接受以下参数:
- origin, the position at which the command was executed
- origin,执行命令时的位置
- this entity, the @s entity of the command being executed (optional)
- this 实体,正在执行的命令的 @s 实体(可选)
ADDED MINECRAFT:COMMAND_COMPUTE_POSITION
加入了 MINECRAFT:COMMAND_COMPUTE_POSITION
- Currently used for the /compute block command
- 目前用于 /compute block 命令
- It takes the following parameters:
- 它接受以下参数:
- Everything included in minecraft:command_compute_default
- minecraft:command_compute_default 中包含的所有内容
- block_entity, the block entity of the block at the position given in a command
- block_entity, 命令中给定位置的方块实体
- block_state, the current state of the block at the position given in a command
- block_state,命令中给定位置的方块状态
ADDED MINECRAFT:COMMAND_COMPUTE_ENTITY
加入了 MINECRAFT:COMMAND_COMPUTE_ENTITY
- Currently used for the /compute entity command
- 目前用于 /compute entity 命令
- It takes the following parameters:
- 它接受以下参数:
- Everything included in minecraft:command_compute_default
- minecraft:command_compute_default 中包含的所有内容
- target_entity, the entity selected by the selector given in a command
- target_entity,由命令中给定的选择器选中的实体
ADDED MINECRAFT:CONTAINER_PROCESS
加入了 MINECRAFT:CONTAINER_PROCESS
- Currently used to evaluate cooking and brewing fuel values
- 目前用于评估烹饪和酿造的燃料
- It takes the following parameters:
- 它接受以下参数:
- container, the container or inventory being evaluated
- container, 目标容器或物品栏
- block_entity, the block entity being fueled
- block_entity,正在被添加燃料的方块实体
- block_state, the current state of the block being fueled
- block_state, 被用作燃料的方块的当前状态
- origin, the location of the block being fueled
- origin, 被添加燃料的方块的位置
CHANGED MINECRAFT:ADVANCEMENT_LOCATION
更改了 MINECRAFT:ADVANCEMENT_LOCATION
- Block entities are now available in context and can be matched by conditions like minecraft:match_block
- 方块实体现在可在上下文中使用,并可通过诸如 minecraft:match_block 之类的条件进行匹配
CHANGED MINECRAFT:BLOCK_INTERACT
更改了 MINECRAFT:BLOCK_INTERACT
- origin is now available in context, as the center of the block being interacted with
- origin 现在可以在上下文中使用,作为被交互方块的中心
LOOT POOL ENTRIES
战利品池条目
- The conditions field in loot pool entries has been renamed to condition and now accepts an inline value or a namespaced ID of a minecraft:predicate type
- 战利品池条目中的 conditions 字段重命名为 condition,现在接受一个内联值或 minecraft:predicate 类型的命名空间 ID。
- The functions field in loot pool entries has been renamed to modifier and now accepts an inline value (including a list as a short form of minecraft:sequence) or a namespaced ID of a minecraft:item_modifier type
- 战利品池条目中的 functions 字段重命名为 modifier,并且现在接受内联值(包括作为 minecraft:sequence 简写形式的列表)或 minecraft:item_modifier 类型的命名空间ID
- This field is now present on all loot entries, including previously omitted minecraft:alternatives, minecraft:sequence, and minecraft:group
- 该字段现在出现在所有战利品条目上,包括之前省略的 minecraft:alternatives、minecraft:sequence 以及 minecraft:group
CHANGED MINECRAFT:TAG
更改了 MINECRAFT:TAG
- The name field has been renamed to items and now accepts a single namespaced ID, a list of namespaced IDs, or a hash-prefixed tag ID of a minecraft:item type
- name 字段重命名为 items 现在接受一个命名空间 ID、命名空间 ID 列表、或 minecraft:item 类型的以 # 为前缀的标签 ID
CHANGED MINECRAFT:LOOT_TABLE
更改了 MINECRAFT:LOOT_TABLE
- The value field now accepts a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:loot_table type
- value 字段现在接受一个命名空间ID、命名空间ID列表、内联值列表,或 minecraft:loot_table 类型的以 # 为前缀的标签 ID
- Added expand field, working the same as in the minecraft:tag pool entry:
- 加入了 expand 字段,其作用与 minecraft:tag 池条目中的相同:
- if true, each entry inside the tag will be added to the outer pool, with weights equal to the weight of this entry
- 如果 true,则该标签内的每个条目都会被添加到外部池中,其权重等于该条目的权重
- if false, this pool entry will operate as a single entry in the outer pool
- 如果为 false,此池条目将作为外部池中的单个条目运行
- If this entry gets selected, it will return all items from all referenced loot tables
- 如果此条目被选中,它将返回所有引用的战利品表中的所有物品
LOOT FUNCTIONS
战利品函数
- The conditions field is now available in all loot functions and has been renamed to condition
- conditions 字段现在可用于所有战利品函数,并重命名为 condition
- It now also accepts an inline value or a namespaced ID, but no longer an inline list of conditions
- 它现在也接受内联值或命名空间ID,但不再接受内联条件列表
- The functionality of the old condition list format can be achieved by explicitly using the minecraft:all_of loot condition type
- 旧条件列表格式的功能可以通过显式使用 minecraft:all_of 战利品条件类型来实现
- The function field (describing the function type) has been renamed to type
- function 字段(描述函数类型)重命名为 type
CHANGED MINECRAFT:SEQUENCE
更改了 MINECRAFT:SEQUENCE
- The functions field now accepts an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:item_modifier type
- functions 字段现在接受一个内联值、命名空间ID、命名空间ID列表、内联值列表,或 minecraft:item_modifier 类型的以 # 为前缀的标签 ID
- Added an optional condition field which accepts an inline value or a namespaced ID of a minecraft:predicate type
- 加入了一个可选的condition字段,该字段接受内联值或minecraft:predicate类型的命名空间ID
- The inline format of minecraft:sequence (previously only a list of inline functions) can now also accept a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:item_modifier type
- minecraft:sequence 的内联格式(之前仅支持内联函数列表)现在还可以接受命名空间ID列表、内联值列表,或 minecraft:item_modifier 类型的以 # 为前缀的标签 ID
- This format is now consistently available for all fields of a loot function type (but not for stand-alone files), which means that every such field can accept an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:item_modifier type
- 该格式现在已统一可用于战利品函数类型的所有字段(但不适用于独立文件),这意味着每个此类字段都可以接受一个内联值、一个命名空间 ID、一个命名空间 ID 列表、一个内联值列表,或 minecraft:item_modifier 类型的以 # 为前缀的标签 ID
CHANGED MINECRAFT:MODIFY_CONTENTS
更改了 MINECRAFT:MODIFY_CONTENTS
- The modifier field now accepts an inline value or a namespaced ID of a minecraft:item_modifier type
- modifier 字段现在接受一个内联值或 minecraft:item_modifier 类型的命名空间 ID
CHANGED MINECRAFT:SET_ATTRIBUTES
更改了 MINECRAFT:SET_ATTRIBUTES
- Number providers in the amount sub-fields of the modifiers list now accept an inline value or a namespaced ID of a minecraft:context_float_provider type
- modifiers 列表中 amount 子字段内的数值提供器,现在接受一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
CHANGED MINECRAFT:ENCHANTED_COUNT_INCREASE
Changed MINECRAFT:ENCHANTED_COUNT_INCREASE
- The count field now accepts an inline value or a namespaced ID of a minecraft:context_float_provider type
- count 字段现在接受一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
CHANGED MINECRAFT:ENCHANT_WITH_LEVELS
更改了 MINECRAFT:ENCHANT_WITH_LEVELS
- The levels field now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type
- levels 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_CUSTOM_MODEL_DATA
更改了 MINECRAFT:SET_CUSTOM_MODEL_DATA
- Elements in the floats list can now be an inline value or a namespaced ID of a minecraft:context_float_provider type
- floats 列表中的元素现在接受一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
- Elements in the colors list can now be an inline value or a namespaced ID of a minecraft:context_int_provider type
- colors 列表中的元素现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_ENCHANTMENTS
更改了 MINECRAFT:SET_ENCHANTMENTS
- Values in the enchantments map can now be an inline value or a namespaced ID of a minecraft:context_int_provider type
- enchantments 映射中的值现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_COUNT
更改了 MINECRAFT:SET_COUNT
- The count field now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type
- count 字段现现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:LIMIT_COUNT
更改了 MINECRAFT:LIMIT_COUNT
- The min and max fields inside the limit structure now accept an inline value or a namespaced ID of a minecraft:context_int_provider type
- 在 limit 结构中,min 和 max 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- The limit field no longer accepts a single number
- limit 字段不再接受单个数字
CHANGED MINECRAFT:SET_DAMAGE
更改了 MINECRAFT:SET_DAMAGE
- The damage field now accepts an inline value or a namespaced ID of a minecraft:context_float_provider type
- damage 字段现在接受一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_OMINOUS_BOTTLE_AMPLIFIER
更改了 MINECRAFT:SET_OMINOUS_BOTTLE_AMPLIFIER
- The amplifier field now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type
- amplifier 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_RANDOM_DYES
更改了 MINECRAFT:SET_RANDOM_DYES
- The number_of_dyes field now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type
- number_of_dyes 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_STEW_EFFECT
更改 MINECRAFT:SET_STEW_EFFECT
- The duration field in the elements of the effects list now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type
- effects 列表的元素中的 duration 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
CHANGED MINECRAFT:SET_LOOT_TABLE
更改了 MINECRAFT:SET_LOOT_TABLE
- Removed unused field type
- 移除了未使用的 type 字段
- The name field has been renamed to loot_table_id
- name 字段重命名为 loot_table_id
CHANGED MINECRAFT:EXPLORATION_MAP
更改了 MINECRAFT:EXPLORATION_MAP
- The destination field is no longer optional and now accepts a single namespaced ID, a list of namespaced IDs, or a hash-prefixed tag ID of a minecraft:structure type
- The destination 字段不再为可选字段,现在接受一个命名空间 ID、命名空间 ID 列表,或 minecraft:structure 类型的以 # 为前缀的标签 ID
- The map_color field has been removed
- 移除了map_color
- The function no longer changes the type of the item it is applied to - it now only adds map data to the existing item
- 该函数不再改变其应用到的物品的类型 - 它现在只向现有物品添加地图数据
- Previously it required a minecraft:map and produced a minecraft:filled_map
- 之前它需要一个 minecraft:map 并生成一个 minecraft:filled_map
- The item to produce is now chosen by the loot entry or villager trade itself, so a data pack that produced exploration maps has to change its item from minecraft:map to minecraft:filled_map (or one of the explorer map items)
- 要生成的物品现在由战利品表或村民交易本身选择,因此,生成探险家地图的数据包必须将其物品从 minecraft:map 改为 minecraft:filled_map(或某个探险家地图物品)
- If no matching structure is found, the item is left without a minecraft:map_id - use minecraft:filtered with minecraft:discard_item to drop those, as the vanilla loot tables and villager trades now do
- 如果没有找到匹配的结构,物品不会带有 minecraft:map_id - 使用 minecraft:filtered 和 minecraft:discard_item 来丢弃这些物品,正如原版战利品表和村民交易现在所做的那样
REMOVED MINECRAFT:REFERENCE
移除了 MINECRAFT:REFERENCE
- This function has become obsolete, as any field that takes a function now accepts (among other things) a namespaced ID to other functions
- 此函数已过时,因为任何接受函数的字段现在(除其他外)都接受指向其他函数的命名空间ID
PREDICATES
谓词
- The condition field (describing the predicate type) has been renamed to type
- condition 字段(描述谓词类型)已重命名为 type
CHANGED MINECRAFT:ALL_OF
更改了 MINECRAFT:ALL_OF
- The terms field now accepts an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:predicate type
- terms 字段现在接受一个内联值、命名空间 ID、命名空间 ID 列表、内联值列表,或 minecraft:predicate 类型的以 # 为前缀的标签 ID
- Note: values of this type can no longer be shortened to a single list, a full object with the type minecraft:all_of needs to be used explicitly
- 注意:此类型的值不再能简化为单个列表,必须显式使用带有类型 minecraft:all_of 的完整对象
CHANGED MINECRAFT:ANY_OF
更改了 MINECRAFT:ANY_OF
- The terms field now accepts an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:predicate type
- terms 字段现在接受一个内联值、命名空间 ID、命名空间 ID 列表、内联值列表,或 minecraft:predicate 类型的以 # 为前缀的标签 ID
CHANGED MINECRAFT:INVERTED
更改了 MINECRAFT:INVERTED
- The term field now accepts an inline value or a namespaced ID of a minecraft:predicate type
- term 字段现在接受一个内联值或 minecraft:predicate 类型的命名空间 ID
CHANGED MINECRAFT:RANDOM_CHANCE
更改了 MINECRAFT:RANDOM_CHANCE
- The chance field now accepts an inline value or a namespaced ID of a minecraft:context_float_provider type
- chance 字段现在接受内联值,或 minecraft:context_float_provider 类型的命名空间 ID
REMOVED MINECRAFT:VALUE_CHECK
移除了 MINECRAFT:VALUE_CHECK
- This condition has been split into integer and float variants
- 此条件已拆分为整数和浮点变体
ADDED MINECRAFT:INT_VALUE_CHECK
加入了 MINECRAFT:INT_VALUE_CHECK
- Checks a value against some range
- 检查数值是否在某个范围内
Fields: - 字段:
- value - an inline value or a namespaced ID of a minecraft:context_int_provider type
- value - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- test - one of:
- test - 以下之一:
- an inline value (including a single integer) or a namespaced ID of a minecraft:context_int_provider type
- 一个内联值(包括单个整数)或 minecraft:context_int_provider 类型的命名空间 ID
- Will test if the result of value is equal to the provided test value
- 测试 value 的结果是否等于提供的 test 值
- an object with fields:
- 一个包含字段的对象:
- min - an optional inline value (including a single integer) or a namespaced ID of a minecraft:context_int_provider type
- min - 一个可选的内联值(包括单个整数)或 minecraft:context_int_provider 类型的命名空间 ID
- max - an optional inline value (including a single integer) or a namespaced ID of a minecraft:context_int_provider type
- max - 一个可选的内联值(包括单个整数)或 minecraft:context_int_provider 类型的命名空间ID
- Will test if the result of value is between min and max (inclusive)
- 将检查 value 的结果是否在 min 和 max 之间(包含)
ADDED MINECRAFT:FLOAT_VALUE_CHECK
加入了 MINECRAFT:FLOAT_VALUE_CHECK
- Checks value against some range
- 检查数值是否在某个范围内
Fields: - 字段:
- value - an inline value or a namespaced ID of a minecraft:context_float_provider type
- value - 一个内联值或 minecraft:context_float_provider 类型的命名空间ID
- test - one of:
- test - 以下之一:
- an inline value (including a single float) or a namespaced ID of a minecraft:context_float_provider type
- 一个内联值(包括单个浮点数)或 minecraft:context_float_provider 类型的命名空间ID
- Will test if the result of value is equal to the provided test value
- 将检查 value 的结果是否等于所提供的 test 值
- an object with fields:
- 一个包含字段的对象:
- min - an optional inline value (including a single float) or a namespaced ID of a minecraft:context_float_provider type
- min - 可选的内联值(包括单个浮点数)或 minecraft:context_float_provider 类型的命名空间ID
- max - an optional inline value (including a single float) or a namespaced ID of a minecraft:context_float_provider type
- max - 可选的内联值(包括单个浮点数)或 minecraft:context_float_provider 类型的命名空间 ID
- Will test if the result of value is between min and max (inclusive)
- 将检查 value 的结果是否在 min 和 max 之间(包含)
CHANGED MINECRAFT:TIME_CHECK
更改了 MINECRAFT:TIME_CHECK
- The min and max fields inside the value structure now accept an inline value or a namespaced ID of a minecraft:context_int_provider type
- 现在 value 结构中的 min 和 max 字段可以接受内联值或 minecraft:context_int_provider 类型的带命名空间ID
- The value field itself now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type (previously only integers were allowed)
- value 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID(以前只允许整数)
CHANGED MINECRAFT:ENTITY_SCORES
更改了 MINECRAFT:ENTITY_SCORES
- The min and max fields inside the values of the scores map now accept an inline value or a namespaced ID of a minecraft:context_int_provider type
- min 和 max 字段(位于 scores 映射的值中)现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- The scores field itself now accepts an inline value or a namespaced ID of a minecraft:context_int_provider type (previously only integers were allowed)
- scores 字段现在接受一个内联值或 minecraft:context_int_provider 类型的命名空间 ID(之前只允许整数)
CHANGED MINECRAFT:DAMAGE_SOURCE_PROPERTIES
更改了 MINECRAFT:DAMAGE_SOURCE_PROPERTIES
- The predicate.tags.id field now accepts a single namespaced ID, a list of namespaced IDs, or a hash-prefixed tag ID of a minecraft:damage_type type
- predicate.tags.id 字段现在接受一个命名空间ID、命名空间ID列表,或 minecraft:damage_type 类型的以 # 为前缀的标签 ID
REMOVED MINECRAFT:REFERENCE
移除了 MINECRAFT:REFERENCE
- This condition has become obsolete, as any field that takes a loot condition now accepts (among other things) a namespaced ID to other conditions
- 此条件已过时,因为任何接受战利品条件的字段现在都(除其他内容外)接受指向其他条件的命名空间ID
ADDED VANILLA PREDICATES
加入了 VANILLA 谓词
New entries added to the previously empty minecraft:predicate:
向之前为空的 minecraft:predicate 加入了新条目:
- minecraft:tool/can_silk_touch
- minecraft:tool/can_silk_touch
- minecraft:tool/can_shear
- minecraft:tool/can_shear
- minecraft:block/fast_cooking
- minecraft:block/fast_cooking
ADDED MINECRAFT:MATCH_BLOCK CONDITION TYPE
加入了 MINECRAFT:MATCH_BLOCK 谓词
Matches block state and optionally block entity data and components (if present)
匹配方块状态,以及可选的方块实体数据和组件(如果存在)
Fields (same as the elements of the minecraft:can_place_on component):
字段(与 minecraft:can_place_on 组件的元素相同):
- blocks - optional block id, list of namespaced block IDs, or hash-prefixed block tag to match
- blocks - 可选方块ID、命名空间方块ID列表或以 # 为前缀的方块标签以匹配
- state - optional map of block state property keys to values to match
- state - 可选的方块状态属性键到要匹配的值的映射
- nbt - optional block entity NBT to match
- nbt - 可选的方块实体 NBT 用于匹配
- The match will fail if this field is present but no block entity is available in the context
- 如果此字段存在,但上下文中没有可用的方块实体,则匹配将失败
- components - optional map of exact components to match
- components - 可选的要完全匹配的组件的映射
- The match will fail if this field is present but no block entity is available in the context
- 如果存在此字段但上下文中没有可用的方块实体,则匹配将失败
- predicates - optional map of component predicates to match
- predicates - 可选组件谓词映射,用于匹配
- The match will fail if this field is present but no block entity is available in the context
- 如果此字段存在,但上下文中没有可用的方块实体,则匹配将失败
REMOVED MINECRAFT:BLOCK_STATE_PROPERTY CONDITION TYPE
移除了 MINECRAFT:BLOCK_STATE_PROPERTY 条件类型
- This has been fully replaced by minecraft:match_block
- 已完全替换为 minecraft:match_block
POTION PREDICATES
药水谓词
The minecraft:potion_contents Data Component Predicate has been changed to allow matching on specific potion effects.
更改了minecraft:potion_contents数据组件谓词,以允许匹配特定的药水效果。
The previous predicate format used a list of potion types, the new format allows for more refined matching.
之前的谓词格式使用了一个药水类型列表,新格式允许更精细的匹配。
The following fields can be used in any combination, all are optional:
以下字段可以任意组合使用,所有字段都是可选的:
- potions - a list of potion types or a potion tag to match
- potions - 药水效果ID列表或用于匹配的药水效果标签
- effects - a Collection Predicate of mob_effects predicates to match
- effects - 用于匹配的mob_effects谓词列表
- The Collection Predicate format is as follows:
- 集合谓词格式如下:
- contains - a list of mob_effects predicates to match
- contains - 用于匹配的mob_effects谓词列表
- count - a list of options for matching a specific number of mob effect predicates, which follow the same format as the minecraft:effects entity sub-predicate
- count - 一个选项列表,用于匹配特定数量的生物效果谓词,其格式与 minecraft:effects 实体子谓词相同
- test - the mob_effects predicate to match
- test - 用于匹配的mob_effects谓词列表
- count - the number of matches required, or with min and max will match a range of counts
- count - 所需匹配的数量,或与min和max一起使用将匹配一个大小范围
- size - require the mob effects list to have a specific size, or with min and max will match a range of sizes
- size - 要求状态效果列表具有特定大小,或与min和max一起使用将匹配一个大小范围
The mob_effects predicate format is a mapping of effect types to properties of that effect. All fields are optional, only the provided fields will be used for matching:
mob_effects 谓词格式是效果类型到该效果属性的映射。所有字段均为可选,只有提供的字段将用于匹配:
{
"minecraft: <effect type>": {
"duration": <integer bounds representing a duration in ticks>,
"amplifier": <integer bounds>,
"ambient: true/false,
"visible": true/false
}
)
Here is an example of matching on several different effects and criteria:
以下是一条同时匹配多种药水效果与判定条件的示例:
"effects": {
"minecraft:jump_boost": {
"duration": 3600,
"amplifier": 5,
"ambient: true,
"visible": true
},
"minecraft:speed": {
"duration": {
"min": 360,
"max": "3600
},
"amplifier: {
"min": 2
}
},
"minecraft:resistance": {}
}
All criteria are optional.
所有条件均为可选。
NUMBER PROVIDERS
数值提供器
- The minecraft:number_provider type has been split into two separate types: minecraft:context_int_provider (integer number providers) and minecraft:context_float_provider (float number providers)
- minecraft:number_provider 类型已被拆分为两个独立的类型:minecraft:context_int_provider(整数数值提供器)和 minecraft:context_float_provider(浮点数数值提供器)
- Note: those new types should not be confused with the already existing minecraft:int_provider_type and minecraft:float_provider_type, which are context-free providers, used mostly for world generation
- 注意:这些新类型不应与已存在的 minecraft:int_provider_type 和 minecraft:float_provider_type 混淆,它们是上下文无关的提供器,主要用于世界生成
INTEGER NUMBER PROVIDERS
整数数值提供器
- Added the minecraft:context_int_provider registry
- 加入了 minecraft:context_int_provider 注册表
- All calculations are performed using 32-bit integers
- 所有计算均使用 32 位整数进行
- The result of calculations that provide invalid values (like division by zero) is undefined
- 产生无效值的计算(如除以零)的结果是未定义的
- Fields:
- 字段:
- type - a namespaced ID from minecraft:context_int_provider_type registry
- type - 来自 minecraft:context_int_provider_type 注册表的命名空间 ID
- <type-specific fields>
- <type-specific fields>
ADDED VANILLA INTEGER NUMBER PROVIDERS
加入了 VANILLA 整数数值提供器
- minecraft:compostable/low
- minecraft:compostable/low
- returns 1 if the minecraft:block_state context parameter is an empty composter, otherwise has a 30% chance of returning 1
- 如果minecraft:block_state上下文参数是一个空的堆肥桶,则返回1,否则有30%的概率返回1
- minecraft:compostable/low_medium
- minecraft:compostable/low_medium
- returns 1 if the minecraft:block_state context parameter is an empty composter, otherwise has a 50% chance of returning 1
- 如果minecraft:block_state上下文参数是一个空的堆肥桶,则返回1,否则有50%的概率返回1
- minecraft:compostable/medium
- minecraft:compostable/medium
- returns 1 if the minecraft:block_state context parameter is an empty composter, otherwise has a 65% chance of returning 1
- 如果minecraft:block_state上下文参数是一个空的堆肥桶,则返回1,否则有65%的概率返回1
- minecraft:compostable/medium_high
- minecraft:compostable/medium_high
- returns 1 if the minecraft:block_state context parameter is an empty composter, otherwise has an 85% chance of returning 1
- 如果 minecraft:block_state上下文参数是一个空的堆肥桶,则返回1,否则有85%的概率返回1
- minecraft:compostable/always_add_one
- minecraft:compostable/always_add_one
- minecraft:cooking/time_bamboo
- minecraft:cooking/time_bamboo
- Returns the burn time in ticks for Bamboo and Scaffolding
- 返回竹子和脚手架的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_blaze_rod
- minecraft:cooking/time_blaze_rod
- Returns the burn time in ticks for Blaze Rods
- 返回烈焰棒的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_boats
- minecraft:cooking/time_boats
- Returns the burn time in ticks for Boats
- 返回船的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_coal
- minecraft:cooking/time_coal
- Returns the burn time in ticks for Coal
- 返回煤炭的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_coal_block
- minecraft:cooking/time_coal_block
- Returns the burn time in ticks for Coal Blocks
- 返回煤炭块的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_dried_kelp_block
- minecraft:cooking/time_dried_kelp_block
- Returns the burn time in ticks for Dried Kelp Blocks
- 返回干海带块的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_dry_plants
- minecraft:cooking/time_dry_plants
- Returns the burn time in ticks for various dry plants
- 返回各种干植物的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_hanging_signs
- minecraft:cooking/time_hanging_signs
- Returns the burn time in ticks for Hanging Signs
- 返回悬挂式告示牌的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_lava_bucket
- minecraft:cooking/time_lava_bucket
- Returns the burn time in ticks for Lava Buckets
- 返回岩浆桶的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_roots
- minecraft:cooking/time_roots
- Returns the burn time in ticks for Mangrove Roots
- 返回红灌木的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wood_blocks
- minecraft:cooking/time_wood_blocks
- Returns the burn time in ticks for wood blocks
- 返回木质方块的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wood_items_extra_small
- minecraft:cooking/time_wood_items_extra_small
- Returns the burn time in ticks for very small wood items such as Buttons
- 返回小型的木质物品(如按钮)的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wood_items_large
- minecraft:cooking/time_wood_items_large
- Returns the burn time in ticks for large wood items such as Doors
- 返回大型木质物品(如门)的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wood_items_small
- minecraft:cooking/time_wood_items_small
- Returns the burn time in ticks for small wood items such as Bows
- 返回小型木质物品(如弓)的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wood_slabs
- minecraft:cooking/time_wood_slabs
- Returns the burn time in ticks for wood slabs
- 返回木质台阶的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wool
- minecraft:cooking/time_wool
- Returns the burn time in ticks for most Wool blocks
- 返回大多数羊毛方块的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wool_carpets
- minecraft:cooking/time_wool_carpets
- Returns the burn time in ticks for Wool Carpets
- 返回羊毛地毯的燃烧时间,以游戏刻为单位
- minecraft:cooking/time_wool_slabs
- minecraft:cooking/time_wool_slabs
- Returns the burn time in ticks for Wool Slabs and Cushions
- 返回羊毛台阶和坐垫的燃烧时间,以游戏刻为单位
- minecraft:cooking/normal_burn_time_reduction_factor
- minecraft:cooking/normal_burn_time_reduction_factor
- Returns the burn time reduction factor for cooking fuel when used in a normal furnace
- 返回燃料在普通熔炉中使用时的燃烧时间减少系数
- minecraft:cooking/fast_burn_time_reduction_factor
- minecraft:cooking/fast_burn_time_reduction_factor
- Returns the burn time reduction factor for cooking fuel when used in a block matching the block/fast_cooking predicate
- 返回燃料在用于匹配 block/fast_cooking 谓词的方块时的燃烧时间减少因子
- minecraft:brewing/uses_default
- minecraft:brewing/uses_default
- Returns the default number of brews provided by brewing fuel
- 返回酿造燃料提供的默认次数
ADDED MINECRAFT:ABS
加入了 MINECRAFT:ABS
- Returns the absolute value of input
- 返回 input 的绝对值
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- input - an inline value or a namespaced ID of a minecraft:context_int_provider type
- input - 一个内联值或 minecraft:context_int_provider 类型的命名空间ID
ADDED MINECRAFT:AVG
加入了 MINECRAFT:AVG
- Evaluates multiple integer providers and returns the arithmetic mean of all results
- 评估多个整数提供器并返回所有结果的算术平均值
- Division rounds towards 0
- 除法向 0 取整
- Fields:
- 字段:
- inputs - an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:context_int_provider type
- inputs - 一个内联值、单个命名空间 ID、命名空间 ID 列表、内联值列表,或 minecraft:context_int_provider 类型的以 # 为前缀的标签 ID
- Requires at least one value
- 至少需要一个值
ADDED MINECRAFT:BINOMIAL
加入了 MINECRAFT:BINOMIAL
- Makes n random coin flips with the probability of succeeding equal to p, then returns the number of successes
- 进行n次随机抛硬币,成功概率等于p,然后返回成功的次数
- Fields:
- 字段:
- n - the number of coin flips, an inline value or a namespaced ID of a minecraft:context_int_provider type
- n - 抛硬币的次数,一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- p - the probability of a single coin flip succeeding ([0.0, 1.0]), an inline value, or a namespaced ID of a minecraft:context_float_provider type
- p - 单次硬币投掷成功的概率([0.0, 1.0]),一个内联值,或minecraft:context_float_provider 类型的命名空间 ID
ADDED MINECRAFT:CONDITIONAL
加入了 MINECRAFT:CONDITIONAL
- Returns the value from on_true if its condition is fulfilled or on_false if not
- 如果条件满足,则返回 on_true 的值,否则返回 on_false
- Fields:
- 字段:
- condition - an inline value or a namespaced ID of a minecraft:predicate type
- condition - 一个内联值或 minecraft:predicate 类型的命名空间ID
- on_true - an inline value or a namespaced ID of a minecraft:context_int_provider type which is executed if its condition is fulfilled
- on_true - 一个内联值,或 minecraft:context_int_provider 类型的命名空间 ID,该类型在其条件满足时执行
- on_false - an optional inline value or a namespaced ID of a minecraft:context_int_provider type
- on_false - 一个可选的内联值,或 minecraft:context_int_provider 类型的命名空间 ID
- Defaults to a constant 0 if omitted
- 如果省略,则默认为常量0
ADDED MINECRAFT:CONSTANT
加入了 MINECRAFT:CONSTANT
- Returns a constant value
- 返回一个常量值
- Fields:
- 字段:
- value - an integer
- value - 一个整数
- Can also be written inline as a plain number (foo: 1 is equivalent to foo: {type:"minecraft:constant",value:1})
- 也可以内联写为普通数字(foo: 1 等价于 foo: {type:"minecraft:constant",value:1})
ADDED MINECRAFT:SUB
加入了 MINECRAFT:SUB
- Returns left minus right
- 返回 left 减去 right
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- left - an inline value or a namespaced ID of a minecraft:context_int_provider type
- left - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- right - an inline value or a namespaced ID of a minecraft:context_int_provider type
- right - 一个内联值,或 minecraft:context_int_provider 类型的命名空间 ID
ADDED MINECRAFT:FROM_FLOAT
加入了 MINECRAFT:FROM_FLOAT
- Evaluates a float provider and converts it to an integer value
- 对浮点数提供器求值并将其转换为整数值
- Noninteger values will be truncated (i.e. rounded towards zero)
- 非整数值将被截断(即向零舍入)
- Values that don't fit inside a 32-bit integer (including NaN) are treated as errors and will cancel the calculation
- 无法计入 32 位整数的值(包括NaN)会被视为错误,计算将被取消
- Fields:
- 字段:
- input - an inline value or a namespaced ID of a minecraft:context_float_provider type
- input - 一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
ADDED MINECRAFT:MAX
加入了 MINECRAFT:MAX
- Evaluates multiple integer providers and returns the largest of all results
- 计算多个整数提供器并返回所有结果中的最大值
- Fields:
- 字段:
- inputs - an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:context_int_provider type
- inputs - 一个内联值、单个命名空间 ID、命名空间 ID 的列表、内联值的列表,或minecraft:context_int_provider 类型的以 # 为前缀的标签 ID
- Requires at least one value
- 至少需要一个值
ADDED MINECRAFT:MIN
加入了 MINECRAFT:MIN
- Evaluates multiple integer providers and returns the smallest of all results
- 计算多个整数提供器并返回所有结果中的最大值
- Fields:
- 字段:
- inputs - an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:context_int_provider type
- inputs - 一个内联值、单个命名空间 ID、一个命名空间 ID 列表、一个内联值列表,或 minecraft:context_int_provider 类型的以 # 为前缀的标签 ID
- Requires at least one value
- 需要至少一个值
ADDED MINECRAFT:MOD
加入了 MINECRAFT:MOD
- Returns the modulus of left by right
- 返回 left 对 right 取模的结果
- Uses truncated integer division (rounds towards zero)
- 使用截断整数除法(向零舍入)
- Division by zero is treated as an error and will cancel the calculation
- 除以零会被视为错误,计算将被取消
- Fields:
- 字段:
- left - an inline value or a namespaced ID of a minecraft:context_int_provider type
- left - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- right - an inline value or a namespaced ID of a minecraft:context_int_provider type
- right - 一个内联值或 minecraft:context_int_provider 类型的命名空间ID
ADDED MINECRAFT:FLOOR_MOD
加入了 MINECRAFT:FLOOR_MOD
- Returns the modulus of left by right
- 返回 left 除以 right 的余数
- Uses floored integer division (rounds towards negative infinity)
- 使用向下取整的整数除法(向负无穷方向舍入)
- Division by zero is treated as an error and will cancel the calculation
- 除以零会被视为错误,计算将被取消
- Fields:
- 字段:
- left - an inline value or a namespaced ID of a minecraft:context_int_provider type
- left - 一个内联值或 minecraft:context_int_provider类型的命名空间ID
- right - an inline value or a namespaced ID of a minecraft:context_int_provider type
- right - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
ADDED MINECRAFT:ENVIRONMENT_ATTRIBUTE
加入了 MINECRAFT:ENVIRONMENT_ATTRIBUTE
- Fetches and provides the value of an Environment Attribute (minecraft:environment_attribute)
- 获取并提供环境属性的值(minecraft:environment_attribute)
- Fields
- 字段
- attribute - the Environment Attribute ID to fetch (must be representable as an int)
- attribute - 要获取的环境属性 ID(必须可表示为整数)
ADDED MINECRAFT:NEGATE
加入了 MINECRAFT:NEGATE
- Returns the negation of input
- 返回 input 的相反数
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- input - an inline value or a namespaced ID of a minecraft:context_int_provider type
- input - minecraft:context_int_provider 类型的内联值或命名空间 ID
ADDED MINECRAFT:NUMBER_DISPATCHER
加入了 MINECRAFT:NUMBER_DISPATCHER
- Returns the first case which fulfills its condition or the default if none do
- 返回第一个满足其条件的情况,如果没有则返回 default
- Fields:
- 字段:
- cases - a list of cases in the order that the dispatcher will try to execute them
- cases - 一个案例列表,按调度器尝试执行它们的顺序排列
- Fields:
- 字段:
- condition - an inline value or a namespaced ID of a minecraft:predicate type
- condition - 一个内联值或 minecraft:predicate 类型的命名空间ID
- value - an inline value or a namespaced ID of a minecraft:context_int_provider type which is executed if the condition is fulfilled
- value - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID,如果条件满足则执行
- default - an optional inline value or a namespaced ID of a minecraft:context_int_provider type
- default - 一个可选的内联值,或 minecraft:context_int_provider 类型的命名空间 ID
- Defaults to a constant 0 if omitted
- 如果省略,则默认为常量0
ADDED MINECRAFT:POW
加入了 MINECRAFT:POW
- Returns base to the power of exponent
- 返回 base 的 exponent 次幂
- If the exponent is negative, the calculation will be canceled
- 如果指数为负,计算将被取消
- If both the base and the exponent are zero, the calculation will be canceled
- 如果底数和指数都为零,计算将被取消
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- base - an inline value or a namespaced ID of a minecraft:context_int_provider type
- base - 一个内联值或 minecraft:context_int_provider 类型的命名空间ID
- exponent - an inline value or a namespaced ID of a minecraft:context_int_provider type
- exponent - 一个内联值或 minecraft:context_int_provider 类型的命名空间ID
ADDED MINECRAFT:MUL
加入了 MINECRAFT:MUL
- Evaluates multiple integer providers and returns the product of all results
- 计算多个整数提供器并返回所有结果的乘积
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- inputs - an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:context_int_provider type
- inputs - 一个内联值、单个命名空间 ID、命名空间 ID 列表、内联值列表,或 minecraft:context_int_provider 类型的以 # 为前缀的标签 ID
- Requires at least one value
- 至少需要一个值
ADDED MINECRAFT:DIV
加入了 MINECRAFT:DIV
- Returns left divided by right
- 返回 left 除以 right
- Uses truncated integer division (rounds towards zero)
- 使用截断整数除法(向零舍入)
- Division by zero is treated as an error and will cancel the calculation
- 除以零会被视为错误,计算将被取消
- Fields:
- 字段:
- left - an inline value or a namespaced ID of a minecraft:context_int_provider type
- left - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- right - an inline value or a namespaced ID of a minecraft:context_int_provider type
- right - 一个内联值或 minecraft:context_int_provider 类型的命名空间ID
ADDED MINECRAFT:FLOOR_DIV
加入了 MINECRAFT:FLOOR_DIV
- Returns left divided by right
- 返回 left 除以 right
- Uses floored integer division (rounds towards negative infinity)
- 使用向下取整的整数除法(向负无穷方向取整)
- Division by zero is treated as an error and will cancel the calculation
- 除以零会被视为错误,计算将被取消
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- left - an inline value or a namespaced ID of a minecraft:context_int_provider type
- left - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- right - an inline value or a namespaced ID of a minecraft:context_int_provider type
- right - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
ADDED MINECRAFT:SCORE
加入了 MINECRAFT:SCORE
- Returns a score of the selected target
- 返回所选目标的分数
- If the score is not present, the provider returns the value of fallback
- 如果分数不存在,提供器会返回 fallback 的值
- Fields:
- 字段:
- score - objective name
- score - 记分项名称
- target - score holder (same format as in the number provider version)
- target - 记分持有者(与数字提供器版本中的格式相同)
- fallback - an optional inline value or a namespaced ID of a minecraft:context_int_provider type
- fallback - 一个可选的内联值或 minecraft:context_int_provider 类型的命名空间 ID
- Defaults to a constant 0 if omitted
- 如果省略,则默认为常量0
ADDED MINECRAFT:STORAGE
加入了 MINECRAFT:STORAGE
- Returns an integer value from a command storage
- 从命令存储中返回一个整数值
- If the value is not present, is not a number, or the path returned multiple values, the provider returns the value of fallback
- 如果值不存在、不是数字,或者路径返回了多个值,提供器会返回 fallback 的值
- The conversion of numeric NBT values that are not an integer is undefined
- 非整数的数值 NBT 值的转换未定义
- Fields:
- 字段:
- storage - a namespaced ID of a command storage
- storage - 命令存储的命名空间ID
- path - an NBT path
- path - 一个 NBT 路径
- fallback - an optional inline value or a namespaced ID of a minecraft:context_int_provider type
- fallback - 一个可选的内联值或 minecraft:context_int_provider 类型的命名空间 ID
- Defaults to a constant 0 if omitted
- 如果省略,则默认为常量0
ADDED MINECRAFT:ADD
加入了 MINECRAFT:ADD
- Evaluates multiple integer providers and returns the sum of all results
- 计算多个整数提供器并返回所有结果的总和
- If the final result does not fit inside a 32-bit integer, the calculation will be canceled
- 如果最终结果无法计入 32 位整数,计算将被取消
- Fields:
- 字段:
- inputs - an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:context_int_provider type
- inputs - 一个内联值、一个单一命名空间ID、一个命名空间ID列表、一个内联值列表,或 minecraft:context_int_provider 类型的以 # 为前缀的标签 ID
- Requires at least one value
- 至少需要一个值
ADDED MINECRAFT:UNIFORM
加入了 MINECRAFT:UNIFORM
- Picks a random integer from a closed range
- 从闭区间中随机选取一个整数
- Fields:
- 字段:
- min - minimum value (inclusive), an inline value, or a namespaced ID of a minecraft:context_int_provider type
- min - 最小值(包含)、一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- max - maximum value (inclusive), an inline value, or a namespaced ID of a minecraft:context_int_provider type
- max - 最大值(包含),一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
ADDED MINECRAFT:WEIGHTED_LIST
加入了MINECRAFT:WEIGHTED_LIST
- Returns a value from a distribution of weighted number providers
- 从加权数值提供器的分布中返回一个值
- Fields:
- 字段:
- distribution - a list of objects with the following fields
- distribution - 一个包含以下字段的对象列表
- Fields:
- 字段:
- data - an inline value or a namespaced ID of a minecraft:context_int_provider type
- data - 一个内联值或 minecraft:context_int_provider 类型的命名空间 ID
- weight - a positive integer
- weight - 一个正整数
FLOAT NUMBER PROVIDERS
浮点数数值提供器
- Added a minecraft:context_float_provider registry
- 加入了 minecraft:context_float_provider 注册表
- All calculations are performed using single-precision floating-point numbers ("floats")
- 所有计算均使用单精度浮点数("floats")进行
- The result of calculations that produce NaN and Infinity is undefined
- 产生 NaN 和 Infinity 的计算结果未定义
- Format:
- 格式:
- type - a namespaced ID from minecraft:context_float_provider_type registry
- type - 来自 minecraft:context_float_provider_type 注册表的命名空间 ID
- <type-specific fields>
- <type-specific fields>
ADDED VANILLA FLOAT NUMBER PROVIDERS
加入了 VANILLA 浮点数数值提供器
- minecraft:cooking/speed_default
- minecraft:cooking/speed_default
- Returns the default speed multiplier for cooking fuel
- 返回烹饪燃料的默认速度倍率
- minecraft:cooking/normal_speed_multiplier
- minecraft:cooking/normal_speed_multiplier
- Returns the speed multiplier for cooking fuel when used in a normal Furnace
- 返回在熔炉中使用的烹饪燃料的速度倍率
- minecraft:cooking/fast_speed_multiplier
- minecraft:cooking/fast_speed_multiplier
- Returns the speed multiplier for cooking fuel when used in a block matching the block/fast_cooking predicate
- 返回烹饪燃料在匹配 block/fast_cooking 谓词的方块中使用时的速度倍率
- minecraft:brewing/speed_default
- minecraft:brewing/speed_default
- Returns the default speed multiplier for brewing fuel
- 返回酿造燃料的默认速度倍率
ADDED MINECRAFT:ABS
加入了 MINECRAFT:ABS
- Returns the absolute value of input
- 返回 input 的绝对值
- Fields:
- 字段:
- input - an inline value or a namespaced ID of a minecraft:context_float_provider type
- input - 一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
ADDED MINECRAFT:AVG
加入了 MINECRAFT:AVG
- Evaluates multiple float providers and returns the arithmetic mean of all results
- 计算多个浮点提供器并返回所有结果的算术平均值
- Fields:
- 字段:
- inputs - an inline value, a single namespaced ID, a list of namespaced IDs, a list of inline values, or a hash-prefixed tag ID of a minecraft:context_float_provider type
- inputs - 一个内联值、单个命名空间 ID、一个命名空间 ID 列表、一个内联值列表,或 minecraft:context_float_provider 类型的以 # 为前缀的标签 ID
- Requires at least one value
- 至少需要一个值
ADDED MINECRAFT:CEIL
加入了 MINECRAFT:CEIL
- Returns the ceiling (i.e. rounded towards positive infinity) value of input
- 返回 input 的上取整值(即向正无穷方向取整)
- Fields:
- 字段:
- input - an inline value or a namespaced ID of a minecraft:context_float_provider type
- input - 一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
ADDED MINECRAFT:CONDITIONAL
加入了 MINECRAFT:CONDITIONAL
- Returns the value from on_true if its condition is fulfilled or on_false if not
- 如果条件成立,则返回来自 on_true 的值,否则返回来自 on_false 的值
- Fields:
- 字段:
- condition - an inline value or a namespaced ID of a minecraft:predicate type
- condition - 一个内联值或 minecraft:predicate 类型的命名空间ID
- on_true - an inline value or a namespaced ID of a minecraft:context_float_provider type which is executed if its condition is fulfilled
- on_true - 一个内联值或 minecraft:context_float_provider 类型的命名空间 ID,当其条件满足时执行
- on_false - an optional inline value or a namespaced ID of a minecraft:context_float_provider type
- on_false - 一个可选的内联值或 minecraft:context_float_provider类型的命名空间ID
- Defaults to a constant 0.0 if omitted
- 如果省略,默认为常量 0.0
ADDED MINECRAFT:CONSTANT
加入了 MINECRAFT:CONSTANT
- Returns a constant value
- 返回一个常量值
- Fields:
- 字段:
- value - a float
- value - 一个浮点数
- Can also be written inline as a plain number (foo: 1.0 is equivalent to foo: {type:"minecraft:constant",value:1.0})
- 也可以内联写为常数(foo: 1.0 等同于 foo: {type:"minecraft:constant",value:1.0})
ADDED MINECRAFT:COS
加入了 MINECRAFT:COS
- Returns the cosine of input
- 返回 input 的余弦值
- Fields:
- 字段:
- input - argument in radians, an inline value, or a namespaced ID of a minecraft:context_float_provider type
- input - 以弧度表示的参数、一个内联值,或 minecraft:context_float_provider类型的命名空间ID
ADDED MINECRAFT:SUB
加入了 MINECRAFT:SUB
- Returns left minus right
- 返回 left 减去 right
- Fields:
- 字段:
- left - an inline value or a namespaced ID of a minecraft:context_float_provider type
- left - 一个内联值或 minecraft:context_float_provider 类型的命名空间ID
- right - an inline value or a namespaced ID of a minecraft:context_float_provider type
- right - 一个内联值或 minecraft:context_float_provider 类型的命名空间 ID
ADDED MINECRAFT:ENCHANTMENT_LEVEL
加入了 MINECRAFT:ENCHANTMENT_LEVEL
- Evaluates Enchantment Level-Based (minecraft:enchantment_level_based_value_type) parameter
- 评估基于魔咒等级的 (minecraft:enchantment_level_based_value_type) 参数
- Fields:
- 字段:
- amount: A Level-Based Value giving a value based on the level of the Enchantment
- amount: 一个基于等级的值,根据魔咒的等级给出一个值
ADDED MINECRAFT:ENVIRONMENT_ATTRIBUTE
加入了 MINECRAFT:ENVIRONMENT_ATTRIBUTE
- Fetches and provides the value of an Environment Attribute (minecraft:environment_attribute)
- 获取并提供环境属性(minecraft:environment_attribute)的值
- Fields
- 字段
- attribute - the Environment Attribute ID to fetch (must be representable as a float)
- attribute - 要获取的环境属性ID(必须能够表示为浮点数)
ADDED MINECRAFT:FLOOR
加入了 MINECRAFT:FLOOR
- Returns the floored (i.e. rounded towards negative infinity) value of input
- 返回 input 的向下取整(即向负无穷方向舍入)后的值
- Fields:
- 字段:
- input - an inline value or a namespaced ID of a minecraft:context_float_provider type
- input - 一个内联值或 minecraft:context_float_provider 类型的命名空间ID
|
|