# 自定义物品模型

在 **物品基础** 一节中，我们制作了如下一个物品配置：

```
items:
  myitem:
    resource:
      material: DIAMOND_SWORD
      generate: true
      textures:
      - item/example_item.png
```

我们当时提到 `generate` 保留为 `true`，那么是否可以填写为 `false` 呢？答案是肯定的，本节我们就教导自定义物品模型。

### true 和 false 的区别

如果我们填写为 **true**，**ItemsAdder** 将自动生成原版的该物品的模型。原版的大多数物品是没有“模型”概念可言的，大多为我们俗称的 **2D** 物品。即使有模型的，也是你想不到的：

* 弓就有模型，它在玩家不同幅度拉弓时的贴图是不一样的。

要创建我们自己的自定义物品模型，实现 **3D** 物品，就需要我们自己制作一个模型文件了。

我们可以使用 **Blockbench** 软件制作自己的物品模型，具体的教程在很多地方都有不少，本篇教程主攻 **ItemsAdder**，故在此不再赘述，我们下面开始介绍你在拥有自定义模型文件后所做的事情。

![这是一个原版模型。](/files/aBBFJQ3rz3gCabgJKDns)

![这是一个自定义物品模型。](/files/sVi7GwAOhxFUKyL9GFnW)

### models 文件夹的了解

在前节中我们已经提到，我们往往将贴图放在 `resource_pack/assets/你命名的文件夹/textures` 内，而在配置中贴图的路径不需要指定到 **textures** 文件夹，直接填写 textures 文件夹内的目录即可，模型也是同理，我们只需要把 `textures` 替换为 `models` 即可。

models 文件夹内存放各个物品的模型，为 .json 格式。

### false 后的配置变化

在修改为 `false` 后，我们需要在将 `textures` 替换为 `model_path` 选项，并使用该选项指定自定义模型的路径，正如上文所述，你不需要指定到 **models** 文件夹，直接填写 **models** 文件夹内的目录即可，下面即为一个示例：

```
resource:
  material: PAPER
  generate: false
  model_path: children/cooking_cauldron_1_witch
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/itemsadder-doc/wu-pin/zi-ding-yi-wu-pin-mo-xing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
