Itematic
一款 添加数据驱动物品的模组。 你可以轻松地为你的世界添加自定义物品! 只需在数据包和资源包中定义一个物品即可! 功能包括:
- 自定义物品
- 可自定义的创造模式物品栏堆叠
- 物品事件
- 可在各种情境中使用的操作
工具与示例
这些是帮助你创建自己的物品和其他内容的工具:
这是一个包含示例的仓库:
Itematic
The mod that adds data-driven items. You can easily add your own items to your world! Just define an item in your data pack and resource pack and you're all set! Features include:
- Custom items
- Customisable Creative inventory item stacks
- Item events
- Actions to use in various contexts
Tools and Examples
These are tools to help create your own items and more:
This is a repository with examples:
下载 Itematic
下载 Itematic
下载 Itematic
下载 Itematic
下载 Itematic
下载 Itematic
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itematic
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itematic
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itematic
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Itematic
Itematic 0.9.0 Preview 5 for 26.3
2026年11月17日
你 说 Mojang 在 26.4 中添加了一个数据驱动的发射行为注册表?! 这又是附魔的重演,而且更糟,因为这影响了我模组中的几个系统…… 唉,迟早会发生;好在现在原版里已经有了。 现在我在移植到 26.4 时会有额外的乐趣。
此预览版将所有剩余的物品行为迁移到了数据组件! 这意味着物品行为系统现在仅提供数据组件,自 1.20.5 引入数据组件以来,再次完全匹配原版。
更改
- 移除了
minecraft:smithing_template注册表,并将其元素移至客户端的数据驱动锻造模板显示资产。
物品行为
- 添加了以下物品行为:
minecraft:glider_fuelminecraft:sign_modifier
- 将
minecraft:map_holder重命名为minecraft:map_decoration_holder并进行了额外更改,见下文。 - 将
minecraft:smithing_template_provider重命名为minecraft:smithing_template_display并进行了额外更改,见下文。 - 移除了以下物品行为:
minecraft:mappable- 此行为已移至新的
minecraft:fill_map物品修饰符,类似于minecraft:exploration_map物品修饰符。 - 所以如果你之前有:
你现在必须结合使用此物品修饰符和{ "minecraft:mappable": { "transforms_into": "minecraft:filled_map" } }minecraft:use物品事件:[ { "type": "minecraft:split", "count": 1 }, { "type": "minecraft:set_item", "item": "minecraft:filled_map" }, { "type": "minecraft:fill_map", "position": "this", "zoom": 0 } ] - 有关
minecraft:fill_map物品修饰符类型的更多信息,请参阅物品修饰符部分。
- 此行为已移至新的
minecraft:unlock_recipes- 此行为已移至
minecraft:recipes数据组件,且不会提供有意义的默认值。 - 相反,其数据必须使用
minecraft:recipes数据组件设置在各个物品堆栈上,其行为将自动在该物品堆栈上生效。
- 此行为已移至
minecraft:attack_blocking
- 使其由该行为组件提供的
minecraft:blocks_attacks数据组件决定行为,而不是由行为组件本身决定,从而再次匹配原版。
minecraft:banner_pattern_holder
- 使其由该行为组件提供的
minecraft:banner_patterns数据组件决定行为,而不是由行为组件本身决定,从而再次匹配原版。 - 将其所有配方和熔炉台行为移至新的
minecraft:banner_base_color数据组件。 - 将
color字段重命名为banner_base_color。- 这与新的
minecraft:banner_base_color数据组件相匹配。
- 这与新的
- 不再提供专门的翻译键。相反,
minecraft:base_color数据组件现在提供此翻译键,使其适用于任何物品堆栈。 - 如果指定了
banner_base_color字段,则现在提供新的minecraft:banner_base_color数据组件。
所以如果你之前有:
{
"minecraft:banner_pattern_holder": {
"color": "orange"
}
}
你现在必须改用:
{
"minecraft:banner_pattern_holder": {
"banner_base_color": "orange"
}
}
minecraft:brush
- 将其所有行为移至新的
minecraft:block_brusher数据组件。 - 其值现在也是
minecraft:block_brusher数据组件。有关更多信息,请参阅数据组件部分。 - 现在提供新的
minecraft:block_brusher数据组件。
示例:
{
"minecraft:brush": {
"sweep_count": 10
}
}
minecraft:castable
- 将其所有行为移至新的
minecraft:castable数据组件。 - 其值现在也是
minecraft:castable数据组件。有关更多信息,请参阅数据组件部分。 - 现在提供新的
minecraft:castable数据组件。
示例:
{
"minecraft:castable": {
"cast_sound": "minecraft:entity.fishing_bobber.throw",
"fish_experience": "minecraft:fishing/experience",
"fish_loot_table": "minecraft:gameplay/fishing",
"retrieve_sound": "minecraft:entity.fishing_bobber.retrieve"
}
}
minecraft:damageable
- 使其由该行为组件提供的
minecraft:max_damage和minecraft:damage数据组件决定行为,而不是由行为组件本身决定,从而再次匹配原版。 - 将其所有物品保留行为移至新的
minecraft:preserve_damaged_item数据组件。 - 如果
preserve_item字段设置为true,则现在提供新的minecraft:preserve_damaged_item数据组件。
minecraft:debug_stick
- 将其所有行为移至
minecraft:debug_stick_state数据组件。
minecraft:dye
- 将其修改告示牌文本颜色的行为移至
minecraft:sign_modifier数据组件。 - 此行为不提供该数据组件;必须改用新的
minecraft:sign_modifier物品行为。
所以如果你之前有:
{
"minecraft:dye": "orange"
}
你现在必须改用:
{
"minecraft:dye": "orange",
"minecraft:sign_modifier": {
"apply_sound": "minecraft:item.dye.use",
"color": "orange"
}
}
minecraft:firework
- 其所有行为已移至
minecraft:entity_placer和新的minecraft:glider_fuel数据组件。 - 此行为不再提供
minecraft:entity_placer和minecraft:glider_fuel数据组件;需改用minecraft:entity和新的minecraft:glider_fuel物品行为。 - 新增字段:
default。- 其值为
minecraft:fireworks数据组件,代表每个物品组中默认的烟花。
- 其值为
示例:
{
"minecraft:firework": {
"default": {
"flight_duration": 1
}
}
}
因此,如果你有如下内容:
{
"minecraft:firework": {}
}
若你想使用实体放置行为,则现在必须改为使用以下内容:
{
"minecraft:entity": {
"entity": {
"entity": "minecraft:firework_rocket",
"spawn_rules": "minecraft:firework_rocket"
}
}
}
或者,若你想使用滑翔燃料行为,则需使用以下内容:
{
"minecraft:glider_fuel": {
"constantly_added_speed": "minecraft:glider/firework_rocket_constantly_added_speed",
"target_speed": "minecraft:glider/firework_rocket_target_speed",
"target_speed_factor": "minecraft:glider/firework_rocket_target_speed_factor"
}
}
minecraft:glider
- 修改为使其提供的
minecraft:glider数据组件决定行为,而非行为组件本身,以再次与原版保持一致。
minecraft:glider_fuel
- 允许该物品在乘坐
minecraft:glider滑翔时用作加速助推器。 - 格式:一个
minecraft:glider_fuel数据组件。
示例:
{
"minecraft:glider_fuel": {
"constantly_added_speed": "minecraft:glider/firework_rocket_constantly_added_speed",
"target_speed": "minecraft:glider/firework_rocket_target_speed",
"target_speed_factor": "minecraft:glider/firework_rocket_target_speed_factor"
}
}
minecraft:map_decoration_holder
- 提供一个空的
minecraft:map_decorations数据组件作为默认值。 - 格式:一张空地图。
minecraft:potion_holder
- 不再提供专用的翻译键。相反,
minecraft:potion_contents数据组件现在提供此翻译键,使其适用于任何物品组。
minecraft:repairable
- 修改为使其提供的
minecraft:repairable数据组件决定行为,而非行为组件本身,以再次与原版保持一致。
minecraft:sign_modifier
- 允许该物品修改告示牌的文本相关属性。
- 格式:一个
minecraft:sign_modifier数据组件。
示例:
{
"minecraft:sign_modifier": {
"apply_sound": "minecraft:item.honeycomb.wax_on",
"can_apply_without_text": true,
"wax": true
}
}
minecraft:smithing_template_display
- 使该物品在放入锻造台第一个槽位时显示工具提示和槽位纹理。
- 格式:指向资源包中锻造模板显示的标识符。
- 提供
minecraft:smithing_template_display数据组件。
示例:
{
"minecraft:smithing_template_display": "minecraft:netherite_upgrade"
}
minecraft:suspicious_effect_ingredient
- 将
effects字段内联,使物品行为的格式变为minecraft:provides_suspicious_stew_effects数据组件。 - 现在提供新的
minecraft:provides_suspicious_stew_effects数据组件。 - 当使用
minecraft:suspicious_effect_ingredient物品组条目类型时,还会将minecraft:provides_suspicious_stew_effects的数据添加到创造模式库存中的minecraft:suspicious_stew_effects数据组件中。注意,此处使用的是minecraft:provides_suspicious_stew_effects数据组件,而非物品行为组件。
因此,如果你有如下内容:
{
"minecraft:suspicious_effect_ingredient": {
"effects": [
{
"id": "minecraft:saturation",
"duration": 140
}
]
}
}
你现在必须改为使用以下内容:
{
"minecraft:suspicious_effect_ingredient": [
{
"id": "minecraft:saturation",
"duration": 140
}
]
}
数据组件
- 新增以下数据组件:
minecraft:banner_base_colorminecraft:block_brusherminecraft:castableminecraft:glider_fuelminecraft:preserve_damaged_itemminecraft:provides_suspicious_stew_effectsminecraft:sign_modifierminecraft:smithing_template_display
minecraft:blocks_attacks
- 现在无需依赖
minecraft:attack_blocking物品行为即可正常工作,以再次与原版保持一致。
minecraft:banner_base_color
- 确定旗帜相关配方中使用的底色。
- 允许将该物品放置在织布机中以对其应用旗帜图案。
- 格式:一种染料颜色。
示例:
{
"minecraft:banner_base_color": "orange"
}
minecraft:block_brusher
- 允许物品组清理方块并从可疑方块中获取物品。
- 格式:包含以下字段的映射表:
sweep_count: 正整数。应从可疑方块中取出物品前进行清理的次数。
示例:
{
"minecraft:brush": {
"sweep_count": 10
}
}
minecraft:castable
- 允许物品组被投掷到水域中并捕获物品。
- 格式:包含以下字段的映射表:
cast_sound: 音效事件或内联音效事件。投掷物品时播放的音效。retrieve_sound: 音效事件或内联音效事件。收回物品时播放的音效。fish_loot_table: 战利品表。玩家成功捕获物品时提供掉落物的战利品表。fish_experience: 整数或上下文整数提供者。玩家捕获物品时给予的经验值数量。
示例:
{
"minecraft:castable": {
"cast_sound": "minecraft:entity.fishing_bobber.throw",
"fish_experience": "minecraft:fishing/experience",
"fish_loot_table": "minecraft:gameplay/fishing",
"retrieve_sound": "minecraft:entity.fishing_bobber.retrieve"
}
}
minecraft:debug_stick_state
- 现在无需依赖
minecraft:debug_stick物品行为即可正常工作。
minecraft:glider_fuel
- 允许将此物品用作使用
minecraft:glider滑翔时的燃料。- 格式:包含以下字段的映射(Map):
constantly_added_speed: 浮点数或上下文浮点提供器(context float provider)。在达到来自target_speed的稳定速度之前,每刻添加的速度值。- 计算时,结果值将为非负数。即要达到的稳定目标速度。
target_speed: 浮点数或上下文浮点提供器。- 计算时,结果值将为非负数。
target_speed_factor: 浮点数或上下文浮点提供器。接近目标速度的速率。- 计算时,结果值将被钳制在 0 到 1 之间。
- 值为 1 时会瞬间达到目标速度。
- 值为 0 时将永远无法达到目标速度。
- 格式:包含以下字段的映射(Map):
- 这些值仅会计算一次,随后存储在烟花火箭上以供重复使用。
- 若要计算将该物品用作推进器时的理论最大(稳定)速度,可使用公式
(constantly_added_speed / target_speed_factor) + target_speed。 - 请注意,可能无法达到此速度,因为燃料持续时间可能不足。这取决于
minecraft:fireworks数据组件中的flight_duration字段。
示例:
{
"minecraft:glider_fuel": {
"constantly_added_speed": "minecraft:glider/firework_rocket_constantly_added_speed",
"target_speed": "minecraft:glider/firework_rocket_target_speed",
"target_speed_factor": "minecraft:glider/firework_rocket_target_speed_factor"
}
}
minecraft:max_damage
- 现在无需依赖
minecraft:damageable物品行为即可正常工作,与原版保持一致。
minecraft:preserve_damaged_item
- 通过将剩余耐久度始终限制为 1,防止物品堆叠损坏。
- 注意,这不会阻止物品堆叠被使用。需要单独对此进行检查。
- 格式:空映射。
minecraft:provides_suspicious stew_effects
- 使此物品在对棕色蘑菇牛使用时提供可疑炖汤效果。
- 格式:
minecraft:suspicious_stew_effects数据组件。
示例:
{
"minecraft:provides_suspicious_stew_effects": [
{
"id": "minecraft:saturation",
"duration": 140
}
]
}
minecraft:repairable
- 现在无需依赖
minecraft:repairable物品行为即可正常工作,与原版保持一致。
minecraft:sign_modifier
- 允许此物品修改告示牌的文字相关属性。
- 格式:包含以下字段的映射:
color: 可选的染料颜色。设置后,会将交互侧告示牌的文字颜色设置为指定颜色。glow: 可选的布尔值。设置后,会将交互侧告示牌的发光状态设置为指定值。wax: 可选的布尔值。设置后,会将告示牌的涂蜡状态设置为指定值。apply_sound: 声音事件或内联声音事件。成功修改告示牌时播放的声音。can_apply_without_text: 可选的布尔值,默认为false。当为true时,即使交互侧没有文字,也允许应用此修饰符。
示例:
{
"minecraft:sign_modifier": {
"apply_sound": "minecraft:item.honeycomb.wax_on",
"can_apply_without_text": true,
"wax": true
}
}
minecraft:smithing_template_display
- 使此物品在放置于锻造台第一个槽位时显示工具提示和槽位纹理。
- 格式:指向资源包中锻造模板显示的标识符。
使用持续时间提供器
minecraft:trident类型现在使用适当的数据组件(minecraft:max_damage、minecraft:damage和minecraft:preserve_damaged_item)来确定物品是否可用,而不再使用minecraft:damageable物品行为。
实体生成规则集
- 添加了
minecraft:firework_rocket实体生成规则集。
实体生成规则
- 添加了
minecraft:offset_spawn_position_by_interacted_side实体生成规则。 - 将
minecraft:offset_spawn_position_to_exact_y重命名为minecraft:set_spawn_position_to_interacted_position并进行了其他更改,详见下文。
minecraft:offset_spawn_position_by_interacted_side
- 根据交互侧在指定方向上偏移生成位置。
- 格式:包含以下字段的映射:
distance: 正双精度浮点数。基于交互侧从当前位置偏移的距离。
minecraft:set_spawn_position_to_interacted_position
- 如果启用了相应坐标的设置,则将生成位置设置为交互位置。
- 格式:包含以下字段的映射:
x: 布尔值,默认为false。当为true时,将 x 坐标设置为交互的 x 坐标。y: 布尔值,默认为false。当为true时,将 y 坐标设置为交互的 y 坐标。z: 布尔值,默认为false。当为true时,将 z 坐标设置为交互的 z 坐标。
- 此实体生成规则比
minecraft:offset_spawn_position_to_exact_y提供了更多选项,并更正了名称。
因此,如果你原本拥有如下实体生成规则:
{
"type": "minecraft:offset_spawn_position_to_exact_y"
}
你现在必须改用以下内容:
{
"type": "minecraft:set_spawn_position_to_interacted_position",
"y": true
}
实体初始化器
- 烟花火箭现在如果在上下文中存在
minecraft:this_entity,则会自动设置所有者。
上下文参数集
- 添加了
minecraft:glider_boost上下文参数集,用于在使用minecraft:glider_fuel为minecraft:glider加速时计算数值。
minecraft:glider_boost
| 参数 | 值 | 必需 |
|---|---|---|
minecraft:this_entity |
正在使用装备的 minecraft:glider 进行加速的用户实体。 |
是 |
minecraft:origin |
用户加速时的位置。 | 是 |
minecraft:tool |
用于为 minecraft:glider 加速的燃料物品。 |
是 |
动作
- 添加了以下动作:
minecraft:wax_block,调用#minecraft:wax_block动作标签中存在的所有动作,并返回第一个成功的结果。minecraft:wax_copper_block,对铜块进行上蜡。minecraft:unwax_copper_block,对铜块进行去蜡。
- 更新了
minecraft:unwax_block,使其调用#minecraft:unwax_block动作标签中存在的所有动作,而不仅仅是给铜块去蜡,并返回第一个成功的结果。- 这意味着可以通过向动作标签中添加条目来扩展该动作。
- 若要专门对铜块进行去蜡,必须改用
minecraft:unwax_copper_block动作。
- 移除了以下动作类型:
minecraft:modify_sign- 此动作类型已移至新的
minecraft:sign_modifier数据组件和物品行为组件中。 - 因此,如果你之前有这样的动作:
你现在必须改用以下物品行为组件:{ "type": "minecraft:modify_sign", "position": "interacted", "wax": true }{ "minecraft:sign_modifier": { "apply_sound": "minecraft:item.honeycomb.wax_on", "can_apply_without_text": true, "wax": true } }
- 此动作类型已移至新的
minecraft:wax_block- 这已被
minecraft:wax_block动作所取代。
- 这已被
数字提供器
- 添加了
minecraft:fishing/experience上下文整数提供器。 - 添加了以下上下文浮点数提供器:
minecraft:glider/firework_rocket_constantly_added_speedminecraft:glider/firework_rocket_target_speedminecraft:glider/firework_rocket_target_speed_factor
物品修饰符
- 添加了
minecraft:fill_map物品修饰符。
minecraft:fill_map
- 在指定的方块位置用新的地图数据填充物品堆叠。
- 格式:一个包含字段的映射:
position: 实体源或位置源。确定用于地图数据的方块位置。- 当使用实体源(如
"this"、"attacker"、"target_entity"等)时,将提供实体的方块位置。 - 当使用位置源(如
"origin"、"interacted"或"spawned")时,将提供包含实际位置的方块位置。 - 如果无法从上下文中提供任何位置,则不修改物品堆叠。
- 当使用实体源(如
zoom: 可选字节,默认为 2。生成地图的缩放级别。track_position: 可选布尔值,默认为true。是否跟踪地图持有者的位置。unlimited_tracking: 可选布尔值,默认为false。当地图持有者不在地图范围内时,是否继续跟踪其位置。
示例:
{
"type": "minecraft:fill_map",
"position": "this",
"zoom": 0
}
变更
谓词
物品谓词
- 移除了
behavior字段。- 应改用适当的数据组件谓词。
- 这使得检查更加灵活,因为你可以分别检查行为和数据结构。
因此,如果你之前有这样的配置:
{
"behavior": [
"minecraft:item_holder"
]
}
你现在必须改用如下配置:
{
"predicates": {
"minecraft:bundle_contents": {}
}
}
注意,在此示例中,如果你想检查的是物品持有者行为而非其内容的存在与否,也可以选择检查 minecraft:item_holder_rules 数据组件。
锻造台模板显示
- 它们为锻造台的基底槽位和添加物槽位提供工具提示和槽位纹理。
- 它们放置在资源包的
smithing_template_display目录下。 - 格式:一个包含字段的映射:
base_slot: 锻造台模板槽位。基底槽位的显示配置。additions_slot: 锻造台模板槽位。添加物槽位的显示配置。
锻造台模板槽位
- 为锻造台中的槽位提供工具提示和槽位纹理。
- 格式:
description: 文本组件。悬停在槽位上方时显示的工具提示。empty_textures: 标识符列表,指向minecraft:gui图像集中的条目。当槽位内未放置任何物品时显示的纹理。
示例:
{
"additions_slot": {
"description": {
"translate": "item.minecraft.smithing_template.netherite_upgrade.additions_slot_description"
},
"empty_textures": [
"minecraft:container/slot/ingot"
]
},
"base_slot": {
"description": {
"translate": "item.minecraft.smithing_template.netherite_upgrade.base_slot_description"
},
"empty_textures": [
"minecraft:container/slot/helmet",
"minecraft:container/slot/sword",
"minecraft:container/slot/chestplate",
"minecraft:container/slot/pickaxe",
"minecraft:container/slot/leggings",
"minecraft:container/slot/axe",
"minecraft:container/slot/boots",
"minecraft:container/slot/hoe",
"minecraft:container/slot/shovel",
"minecraft:container/slot/nautilus_armor",
"minecraft:container/slot/spear"
]
}
}
修复
- 在特定情况下,放置的实体现在会再次在其正确位置生成。
- 您现在可以在不使用潜行的情况下,对告示牌使用修饰物品了。
- 钓鱼钩现在会再次正确地渲染在对应的手上。
- 静态提示框现在可以正常显示了。
- 下界合金升级材料现在拥有与原版相同的提示框格式。
- 旗帜重复制作配方现在会在未明确指定余量时,正确地保留现有的旗帜。
Itematic 0.9.0 预览版 3(适用于 26.3)
2026年10月20日
此预览版主要关注数据组件,因为它为它们添加了上下文数字提供程序,并将大量物品行为移至数据组件!
更改
物品行为组件
- 移除了
minecraft:cooldown。- 其值已移至
minecraft:useable中的cooldown字段。 - 请注意,现在持续时间以秒为单位指定而非刻,与原版一致,因此你需要将你的数值相应除以 20。
- 其值已移至
如果你之前有如下配置:
{
"minecraft:cooldown": {
"ticks": 20
}
}
你现在必须改用以下配置:
{
"minecraft:useable": {
"cooldown": {
"seconds": 1.0
}
}
}
minecraft:block
- 将其所有行为移至新的
minecraft:block_placer数据组件。 - 现在提供
minecraft:block_placer数据组件。
minecraft:bucket
- 将其所有行为移至新的
minecraft:bucket数据组件。 - 现在提供
minecraft:bucket数据组件。
minecraft:consumable
- 使其提供的行为组件所对应的
minecraft:consumable数据组件决定行为,而不是行为组件本身,再次匹配原版。 - 然而,
has_consume_particles和sound字段分别移至minecraft:useable中的has_use_particles和sound字段。 - 它们的默认值也发生了变化,其中
has_use_particles现在默认为false,而sound完全变为可选字段,不再默认为"minecraft:entity.generic.eat"。 - 添加了
amount字段。- 其值为正整数,默认为 1。
- 表示完成使用物品时消耗的物品数量。
minecraft:consumable数据组件接收了相同的更改。
如果你之前有如下配置:
{
"minecraft:consumable": {
"has_consume_particles": false,
"sound": "minecraft:item.honey_bottle.drink"
},
"minecraft:useable": {
"animation": "drink",
"remainder": {
"id": "minecraft:glass_bottle"
},
"ticks": 40
}
}
你现在必须改用以下配置:
{
"minecraft:consumable": {},
"minecraft:useable": {
"animation": "drink",
"remainder": {
"id": "minecraft:glass_bottle"
},
"sound": "minecraft:item.honey_bottle.drink",
"ticks": 40
}
}
minecraft:enchantable
- 使其提供的行为组件所对应的
minecraft:enchantable数据组件决定行为,而不是行为组件本身,再次匹配原版。
minecraft:entity
- 将其所有行为移至新的
minecraft:entity_placer数据组件。 - 现在提供
minecraft:entity_placer数据组件。
minecraft:equipment
- 使其提供的行为组件所对应的
minecraft:equippable数据组件决定行为,而不是行为组件本身,再次匹配原版。
minecraft:projectile
- 将其所有行为移至新的
minecraft:projectile数据组件。 - 现在提供
minecraft:projectile数据组件。
minecraft:tool
- 使其提供的行为组件所对应的
minecraft:tool数据组件决定行为,而不是行为组件本身,再次匹配原版。
minecraft:useable
- 使其提供的行为组件所对应的所有数据组件决定行为,而不是行为组件本身,匹配原版。
ticks字段现在始终有值,并默认为{"type": "minecraft:instant"}。- 这意味着
minecraft:use_duration数据组件现在始终被添加,并且也处理瞬时使用的情况。
- 这意味着
- 添加了可选的
has_use_particles字段。- 默认为
false。 - 是否在使用物品时显示粒子效果。
- 设置为
true时,提供minecraft:has_use_particles数据组件。
- 默认为
- 添加了可选的
sound字段。- 使用物品时播放的声音。
- 提供
minecraft:use_sound数据组件。
- 添加了可选的
cooldown字段。- 完成使用物品时应用的冷却时间。
- 提供
minecraft:use_cooldown数据组件。
- 现在从
passes字段提供minecraft:use_passes数据组件。
示例:
{
"minecraft:useable": {
"animation": "eat",
"has_use_particles": true,
"sound": "minecraft:entity.generic.eat",
"ticks": 32
}
}
minecraft:weapon
- 使其提供的行为组件所对应的所有数据组件决定行为,而不是行为组件本身,匹配原版。
minecraft:zoom
- 使其提供的行为组件所对应的所有数据组件决定行为,而不是行为组件本身,匹配原版。
- 现在提供
minecraft:zoom_field_of_view_multiplier和minecraft:zoom_sounds数据组件。
数据组件
- 添加了以下数据组件:
minecraft:block_placerminecraft:bucketminecraft:dispense_behaviorminecraft:entity_placerminecraft:has_use_particlesminecraft:item_holder_soundsminecraft:projectileminecraft:use_soundminecraft:zoom_field_of_view_multiplierminecraft:zoom_sounds
minecraft:block_placer
- 在特定条件下使用时在世界中放置一个方块。
- 格式:包含字段的映射表:
block: 一个方块选择器。实际要放置的方块。operator_only: 一个可选布尔值。默认为false。确定是否只有操作员可以放置此方块。passes: 一个可选的方块通行证集合。默认为["block"]。确定其用户可以在何处放置实体。block: 允许将此方块放置在方块上。fluid: 允许将此方块放置在流体上。
示例:
{
"block": "minecraft:cobblestone"
}
minecraft:bucket
- 将桶中的内容放置到世界中。
- 格式:一个包含以下字段的映射表:
entity:可选的实体生成器。要放置的实体。modification:世界修改操作。以特定方式修改世界。
示例:
{
"entity": {
"entity": "minecraft:pufferfish"
},
"modification": {
"type": "minecraft:place_fluid",
"fluid": "minecraft:water",
"place_sound": "minecraft:item.bucket.empty_fish",
"transforms_into": "minecraft:bucket"
}
}
minecraft:consumable
-
移除了
has_consume_particles字段。- 该字段已被
minecraft:has_use_particles数据组件取代。
- 该字段已被
-
移除了
sound字段。 -
该字段已被
minecraft:use_sound数据组件取代。
因此,如果你之前拥有如下配置:
{
"minecraft:consumable": {}
}
现在你需要改用如下配置:
{
"minecraft:consumable": {},
"minecraft:has_use_particles": {},
"minecraft:use_sound": "minecraft:entity.generic.eat"
}
- 新增了
amount字段。- 其值为正整数,默认为 1。
- 表示在使用物品结束时消耗的物品数量。
示例:
{
"minecraft:consumable": {}
}
{
"minecraft:consumable": {
"amount": 2
}
}
minecraft:dispense_behavior
- 决定物品堆在从发射器中被投掷时的行为。
- 格式:一种投掷行为。
- 如果缺失,则直接投掷物品本身。
示例:
{
"minecraft:dispense_behavior": "minecraft:shoot_projectile"
}
minecraft:enchantable
- 现在无需依赖
minecraft:equipment物品行为即可工作,与原版保持一致。 - 新增了一个可选字段
transforms_into。- 其值是一个物品 ID。
- 表示附魔后转换成的目标物品。
示例:
{
"value": 1,
"transforms_into": "minecraft:enchanted_book"
}
minecraft:entity_placer
- 在特定条件下使用时,在世界中放置一个实体。
- 格式:一个包含以下字段的映射表:
entity:实体生成器。实际要放置的实体。uses_collision_shape:可选的方块、方块列表或带井号前缀的方块标签。用于确定哪些方块使用方块的碰撞形状而非交互形状来进行实体的放置判定。allow_spawner_modification:可选布尔值。默认为false。决定是否允许此实体放置器修改刷怪笼。passes:可选的放置位置集合。默认为["block"]。决定用户可以在何处放置该实体。block:允许将该实体放置在方块上。fluid:允许将该实体放置在流体上。
示例:
{
"allow_spawner_modification": true,
"entity": {
"allow_item_data": true,
"entity": "minecraft:pig"
},
"passes": [
"block",
"fluid"
]
}
minecraft:equippable
- 现在无需依赖
minecraft:equipment物品行为即可工作,与原版保持一致。
minecraft:has_use_particles
- 当指定时,在使用物品时会显示粒子效果。
- 其值始终为
{}。
minecraft:item_holder_sounds
- 物品持有者在与其交互时播放的声音。
- 格式:一个包含以下字段的映射表:
insert_item:声音事件或内联声音事件。向物品持有者插入物品堆时播放的声音。insert_item_fail:声音事件或内联声音事件。向物品持有者插入物品堆失败时播放的声音。remove_item:声音事件或内联声音事件。从物品持有者中移除物品堆时播放的声音。empty:声音事件或内联声音事件。使用物品持有者清空内部物品堆时播放的声音。
- 如果缺失,则在与物品堆交互时不播放任何声音。
示例:
{
"minecraft:item_holder_sounds": {
"empty": "minecraft:item.bundle.drop_contents",
"insert_item": "minecraft:item.bundle.insert",
"insert_item_fail": "minecraft:item.bundle.insert_fail",
"remove_item": "minecraft:item.bundle.remove_one"
}
}
minecraft:kinetic_weapon
- 现在无需依赖
minecraft:weapon物品行为即可工作,与原版保持一致。
minecraft:piercing_weapon
- 现在无需依赖
minecraft:weapon物品行为即可工作,与原版保持一致。
minecraft:projectile
- 当作为投射物使用时(例如投掷或通过射手射击)生成一个实体。
- 格式:一个实体生成器。
示例:
{
"components": {
"minecraft:chicken/variant": "minecraft:temperate"
},
"entity": "minecraft:egg"
}
minecraft:smashing_weapon
- 现在无需依赖
minecraft:weapon物品行为即可工作。 - 这与原版的
minecraft:weapon、minecraft:piercing_weapon和minecraft:kinetic_weapon数据组件保持一致。
minecraft:tool
- 现在无需依赖
minecraft:tool物品行为即可工作,与原版保持一致。
minecraft:use_sound
- 在使用物品时播放声音。
- 其值是一个声音事件或内联声音事件。
示例:
{
"minecraft:use_sound": "minecraft:entity.generic.eat"
}
minecraft:weapon
- 现在无需依赖
minecraft:weapon物品行为即可工作,与原版保持一致。
minecraft:zoom_field_of_view_multiplier
- 决定在使用物品时用户的视野缩放倍数。
- 格式:一个最大为 1.0 的正浮点数。
minecraft:zoom_sounds
- 在放大和缩小视野时播放声音。
- 格式:一个包含以下字段的映射表:
start:声音事件或内联声音事件。开始放大视野时播放的声音。stop:声音事件或内联声音事件。停止放大视野(恢复)时播放的声音。
示例:
{
"start": "minecraft:item.spyglass.use",
"stop": "minecraft:item.spyglass.stop_using"
}
持续时间提供程序 (Use Duration Providers)
- 新增了
minecraft:instant类型。
minecraft:instant
- 立即使用物品。
- 无其他附加字段。
示例:
{
"type": "minecraft:instant"
}
上下文整数提供者
- 新增了
minecraft:data_component类型的上下文整数提供者。
minecraft:data_component
- 从数据组件中获取一个整数。
- 格式:包含以下字段的映射表:
component:数据组件上下文整数提供者类型。用于从中检索整数的数据组件。并非所有数据组件都提供整数。请参阅下文“数据组件上下文整数提供者”部分以获取更多信息。source:物品堆栈目标、实体目标或方块实体目标。数据组件的来源。fallback:可选的上下文整数提供者。当该组件无法计算整数时,用作回退的上下文整数提供者。如果未指定,则整个上下文整数提供者将失败。- 由
component确定的特定于组件的字段。
- 如果不存在数据组件来源或数据组件本身,则该整数提供者将无法计算整数。
- 各个数据组件整数提供者也可能因其他条件而失败,例如当缺少另一个预期的数据组件或索引不匹配时。
- 要在类型之间进行转换,可以使用
minecraft:from_float和minecraft:from_int。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:ominous_bottle_amplifier",
"source": "tool"
}
上下文浮点数提供者
- 新增了
minecraft:data_component类型的上下文浮点数提供者。
minecraft:data_component
- 从数据组件中获取一个浮点数。
- 格式:包含以下字段的映射表:
component:数据组件上下文浮点数提供者类型。用于从中检索浮点数的数据组件。并非所有数据组件都提供浮点数。请参阅下文“数据组件上下文浮点数提供者”部分以获取更多信息。source:物品堆栈目标、实体目标或方块实体目标。数据组件的来源。fallback:可选的上下文浮点数提供者。当该组件无法计算浮点数时,用作回退的上下文浮点数提供者。如果未指定,则整个上下文浮点数提供者将失败。- 由
component确定的特定于组件的字段。
- 如果不存在数据组件来源或数据组件本身,则该浮点数提供者将无法计算浮点数。
- 各个数据组件浮点数提供者也可能因其他条件而失败,例如当缺少另一个预期的数据组件或索引不匹配时。
- 要在类型之间进行转换,可以使用
minecraft:from_float和minecraft:from_int。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:food",
"provider": "saturation",
"source": "tool"
}
数据组件上下文整数提供者
- 从特定的数据组件中提供一个整数。
minecraft:custom_data
- 从
minecraft:custom_data数据组件中提供一个整数。 - 字段:
path:NBT 路径。用于检索整数的路径。
- 当没有 NBT 元素匹配、多个 NBT 元素匹配或找到的 NBT 元素不是数字时,提供整数会失败。
- 不同类型的数字会自动转换为整数。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:custom_data",
"path": "example_map.integer_value",
"source": "tool"
}
minecraft:damage
- 使用特定的子提供者从
minecraft:damage数据组件中提供一个整数。 - 字段:
provider:伤害子提供者。- 伤害子提供者特定的字段。
damage
- 按原样提供伤害值。
- 没有其他额外字段。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:damage",
"provider": "damage",
"source": "tool"
}
durability
- 使用
minecraft:max_damage数据组件计算耐久度。 - 没有其他额外字段。
- 当
minecraft:max_damage数据组件不存在时,操作将失败。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:damage",
"provider": "durability",
"source": "tool"
}
minecraft:enchantments
- 从
minecraft:enchantments数据组件中提供一个整数。 - 字段:
enchantment:附魔。用于获取等级的附魔。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:enchantments",
"enchantment": "minecraft:sharpness",
"source": "tool"
}
minecraft:food
- 使用特定的子提供者从
minecraft:food数据组件中提供一个整数。 - 字段:
provider:食物子提供者。- 食物子提供者特定的字段。
nutrition
- 从食物数据组件中提供营养值。
- 没有其他额外字段。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:food",
"provider": "nutrition",
"source": "tool"
}
minecraft:max_damage
- 提供
minecraft:max_damage数据组件中的值。 - 没有其他额外字段。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:max_damage",
"source": "tool"
}
minecraft:max_stack_size
- 提供
minecraft:max_stack_size数据组件中的值。 - 没有其他额外字段。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:max_stack_size",
"source": "tool"
}
minecraft:ominous_bottle_amplifier
- 提供
minecraft:ominous_bottle_amplifier数据组件中的值。 - 没有其他额外字段。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:ominous_bottle_amplifier",
"source": "tool"
}
minecraft:stored_enchantments
- 从
minecraft:stored_enchantments数据组件中提供一个整数。 - 字段:
enchantment:附魔。用于获取等级的附魔。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:stored_enchantments",
"enchantment": "minecraft:sharpness",
"source": "tool"
}
数据组件上下文浮点数提供者
- 从特定的数据组件中提供一个浮点数。
minecraft:custom_data
- 从
minecraft:custom_data数据组件中提供一个浮点数。 - 字段:
path:一个 NBT 路径。用于获取浮点数的路径。
- 当没有 NBT 元素匹配、多个 NBT 元素匹配或找到的 NBT 元素不是数字时,提供浮点数失败。
- 不同类型的数字会自动转换为浮点数。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:custom_data",
"path": "example_map.float_value",
"source": "tool"
}
minecraft:custom_model_data
- 从
minecraft:custom_model_data数据组件中提供一个浮点数。 - 字段:
index:一个非负整数。用于检索自定义模型数据存储的浮点数的索引。
- 当指定索引处没有浮点数时,提供浮点数失败。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:custom_model_data",
"index": 0,
"source": "tool"
}
minecraft:damage
- 使用特定的子提供者从
minecraft:damage数据组件中提供一个浮点数。 - 字段:
provider:一个伤害子提供者。- 伤害子提供者特有的字段。
damage_percentage
- 使用
minecraft:max_damage数据组件计算伤害百分比,结果在 0.0 到 1.0(包含)之间。 - 没有其他额外字段。
- 当不存在
minecraft:max_damage数据组件时,提供失败。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:damage",
"provider": "damage_percentage",
"source": "tool"
}
minecraft:food
- 使用特定的子提供者从
minecraft:food数据组件中提供一个浮点数。 - 字段:
provider:一个食物子提供者。- 食物子提供者特有的字段。
saturation
- 提供来自食物数据组件的饱和度。
- 没有其他额外字段。
示例:
{
"type": "minecraft:data_component",
"component": "minecraft:food",
"provider": "saturation",
"source": "tool"
}
修复
- 使用多遍放置的实体放置物品(例如刷怪蛋)现在不再会生成多个实体。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧