This commit is contained in:
boybook
2025-12-01 20:59:16 +08:00
parent 12738a142c
commit 760c2dd9ad
5535 changed files with 21070 additions and 2021 deletions

View File

@@ -0,0 +1,48 @@
---
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进入游戏可以看到镐子在挖掘过程中不产生耐久消耗了。