Files
netease-bedrock-wiki/mconline/10-addon教程/第08章:自定义武器工具/课程02.简易教学①-没有耐久的镐子.md
2025-08-25 18:36:29 +08:00

1.1 KiB
Raw Permalink Blame History

front, hard, time
front hard time
进阶 10分钟

简易教学①:没有耐久的镐子

作者:境界

{
    "format_version":"1.10",
    "minecraft:item":{
        "components":{
            "minecraft:max_damage":10,
            "minecraft:max_stack_size":1,
            "netease:weapon":{
                "attack_damage":10,
                "enchantment":10,
                "level":0,
                "speed":1,
                "type":"pickaxe"
            }
        },
        "description":{
            "category":"Equipment",
            "identifier":"design:custom_hatchet"
        }
    }
}

1进入关卡编辑器创建武器和工具组件。

2将工具类型改为镐。

3通过资源管理器进入行为包/netease_items_beh网易版物品文件夹找到自定义物品文件。

4默认情况下由编辑器生成的物品设定文件会自带"minecraft:max_damage"键对,这是掌管道具耐久的组件,我们将这一行删掉。

5进入游戏可以看到镐子在挖掘过程中不产生耐久消耗了。