跳到主要内容

纯种龙品种 JSON

纯种龙定义提供龙的基础数值、驯服与繁殖物品、能力、栖息地以及客户端资源位置。

文件位置​

将文件放入数据包的 data/<namespace>/purebred_dragon_breed/ 目录。例如:

data/example/purebred_dragon_breed/azure.json

该文件的注册表 ID 为 example:azure。

字段​

所有字段都直接写在根对象中,不存在 core 或 content 子对象。

字段类型默认值描述
ambient_soundSound event ID可选龙的环境音效。
death_lootLoot table ID可选龙死亡时使用的战利品表。
hatch_timeInteger-1孵化时长,单位为刻。小于或等于 0 的值使用服务器配置。
growth_timeInteger-1成长时长,单位为刻。小于或等于 0 的值使用服务器配置。
size_modifierFloat-1.0体型倍率。小于或等于 0 的值使用服务器配置。
primary_colorHex color string可选主色,不含 #,例如 "4e91d9"。
secondary_colorHex color string可选副色,不含 #。
inventory_textureResource IDminecraft:textures/block/stone.png龙物品栏界面使用的纹理。
breath_typeBreath type registry ID可选引用 dragon_breath_type 中的一个条目。
immunitiesString array[]免疫标识符。例如 "drown" 会改变水中的寻路减速。
attributes属性 ID 到数值的对象{}覆盖实体属性基础值,例如 "minecraft:max_health": 40.0。
habitats栖息地 array[]用于栖息地评分的内联条件。
abilities能力 array[]该龙拥有的内联能力。
taming_itemsItem ID array[]可以驯服该龙的物品。
breeding_itemsItem ID array[]可以让该龙繁殖的物品。
hatch_particlesParticleOptions object可选孵化粒子。该对象必须包含 type,由原版粒子 Codec 分发。
accessoriesString array[]允许的饰品标识符。
model_locationResource ID可选GeckoLib 模型资源位置。
animation_locationResource ID可选GeckoLib 动画资源位置。
variantsVariant array[]该纯种龙可用的变体。

变体对象​

字段类型默认值描述
idString必填本地变体 ID。
textureResource ID可选皮肤纹理。
saddle_textureResource ID可选已装备鞍时的纹理。
glow_textureResource ID可选自发光层纹理。
egg_textureResource ID可选龙蛋纹理。
breath_typeInline breath-type object可选该变体专用的龙息类型。其结构见 龙息类型。
primary_colorHex color string可选变体主色,不含 #。
secondary_colorHex color string可选变体副色,不含 #。
size_modifierFloat-1.0变体体型倍率。

示例​

{
"ambient_sound": "minecraft:entity.ender_dragon.ambient",
"hatch_time": 24000,
"growth_time": 48000,
"size_modifier": 1.15,
"primary_color": "4e91d9",
"secondary_color": "d8f3ff",
"inventory_texture": "example:textures/gui/azure_dragon.png",
"breath_type": "example:frost",
"attributes": {
"minecraft:max_health": 40.0,
"minecraft:movement_speed": 0.28
},
"taming_items": ["minecraft:salmon"],
"breeding_items": ["minecraft:cod"],
"hatch_particles": {
"type": "minecraft:snowflake"
},
"habitats": [
{
"type": "dragon_mounts:biome",
"biome": "#minecraft:is_snowy",
"points": 4
}
],
"abilities": [
{
"type": "dragon_mounts:frost_walker",
"level": 2
}
],
"variants": [
{
"id": "pale",
"texture": "example:textures/entity/dragon/azure_pale.png",
"egg_texture": "example:textures/entity/dragon/egg/azure_pale.png",
"primary_color": "d4efff"
}
]
}
备注

variants[].breath_type 是一个完整的内联龙息类型对象,而根级 breath_type 字段是龙息类型注册表 ID。这两个字段不能互换使用。