Skip to main content

Habitat Type JSON

The dragon_mounts:habitat_type registry does not load standalone data-pack files. Habitat objects are placed in a purebred dragon's habitats array and dispatched by their required type field. Each entry calculates a score at the dragon's current position.

Basic Format

{
"type": "dragon_mounts:biome",
"biome": "#minecraft:is_snowy",
"points": 4
}

Built-in Types

typeFieldsDefaultsEvaluation
pickyrequired_habitats (habitat array, required)noneEvery nested condition must return a nonzero score; their scores are then added.
biomebiome (biome ID or biome tag, required), points (integer)points: 3Scores when the current position belongs to the entry or tag.
in_fluidfluid (fluid ID or fluid tag, required), point_multiplier (float)0.5Counts matching fluids in a 3x3x3 area, then multiplies the count.
world_heightheight (integer, required), below (boolean), points (integer)false, 3With below: false, scores above the height. With true, scores below the height when the sky is not visible.
lightlight (integer, required), below (boolean), points (integer)false, 3Compares block light at the current position.
nearby_blocksblock (block ID or block tag, required), point_multiplier (float)0.5Counts matching blocks in a 3x3x3 area, then multiplies the count.
dragon_breathnonenoneScores 10 when a vanilla dragon-breath area-effect cloud occupies the current position.
timeis_day (boolean), points (integer)true, 1Scores when the requested day/night state matches.

The biome, fluid, and block fields accept a single registry ID, such as "minecraft:water", a tag ID prefixed by #, such as "#minecraft:is_ocean", or an array that mixes both forms:

"block": [
"minecraft:ice",
"#minecraft:logs"
]

Example

{
"habitats": [
{
"type": "dragon_mounts:in_fluid",
"fluid": ["minecraft:water", "#example:dragon_fluids"],
"point_multiplier": 1.0
},
{
"type": "dragon_mounts:picky",
"required_habitats": [
{
"type": "dragon_mounts:biome",
"biome": "#minecraft:is_ocean",
"points": 5
},
{
"type": "dragon_mounts:time",
"is_day": false,
"points": 2
}
]
}
]
}