跳到主要内容

📐 模型

简介

指定游戏使用哪一个物品模型进行渲染,并且指定各个着色索引使用的颜色。

items:
default:topaz_pickaxe:
model:
type: minecraft:model # 在这种情况下 type 是可选的
path: minecraft:item/custom/topaz_pickaxe
generation:
parent: "minecraft:item/handheld"
textures:
"layer0": "minecraft:item/custom/topaz_pickaxe"
提示

如果你不指定类型,它将默认使用 minecraft:model

着色

在本配置中,我们为自定义树叶创建了一个模型。但原版游戏中的默认树叶模型是没有颜色的,因此我们需要配置一个颜色提供器来为其着色。

default:palm_leaves:
model:
type: "minecraft:model"
path: "minecraft:item/custom/palm_leaves"
generation:
parent: "minecraft:block/custom/palm_leaves"
tints:
- type: "minecraft:constant"
value: -12012264
信息

需要颜色的地方支持使用十进制或 RGB 格式

value: 16711680
value:
- 255
- 0
- 0
# 或
value:
- 1.0
- 0.0
- 0.0
value: 255,0,0
# 或
value: 1.0,0.0,0.0

minecraft:constant

type: "minecraft:constant"
value: -12012264

minecraft:custom_model_data

type: "minecraft:custom_model_data"
index: 0
default: -12012264

minecraft:dye

type: "minecraft:dye"
default: -12012264

minecraft:firework

type: "minecraft:firework"
default: -12012264

minecraft:grass

type: "minecraft:grass"
temperature: 0.5
downfall: 0.5

minecraft:map_color

type: "minecraft:map_color"
default: -12012264

minecraft:potion

type: "minecraft:potion"
default: -12012264

minecraft:team

type: "minecraft:team"
default: -12012264