Skip to content

Data type reference

Lemma Brummel edited this page Sep 14, 2026 · 1 revision

Content defined in Kdly Content is represented as KDL nodes, with the node's identifier specifying which content type is being created.

Warning: This documentation is still in progress! There is a lot to cover, so please be patient!

<> indicate a required value, [] indicate an optional value.

Blocks

block <block name: str> { //register a block
    type <block type: str> //see below
    settings [copy=<block ID: str>] {
        //every node type in here is optional
        no_collision //will have no collision box
        non_opaque //will not block light
        slipperiness <slipperiness: num> //adjusts how slippery like ice
        velocity_multiplier <multiplier: num> //adjusts movement speed like soul sand
        jump_velocity_multiplier <multiplier: num> //adjusts jump height like honey
        sounds <sound family: str> //sets sound events the block makes - see Named Properties for values
        luminance <luminance: num> //sets how much light the block gives off
        strength <strength: num> [<resistance: num>] //add resistance to have different hardness/resistance
        hardness <hardness: num> //only sets block break hardness
        resistance <resistance: num>  //only sets block blast resistance
        break_instantly //will break in a single punch like flowers
        ticks_randomly [enable: bool, default true] //will have random ticking, necessary for some mods' extra custom block types
        dynamic_bounds [enable: bool, default true]  //will have dynamic collision, necessary for some mods' extra custom block types
        drops_nothing //will not roll a loot table when broken
        drops_like <block ID: str> //will roll the loot table for the given block when broken
        lava_ignitable [enable: bool, default true] //can be set on fire by nearby lava
        liquid [enable: bool, default true] //is treated as a liquid
        solid [enable: bool, default true] //is treated as a solid
        non_solid [enable: bool, default true] //is treated as a non-solid
        air //treats the block as if it's air
        requires_tool [enable: bool, default true] //block must be mined with a tool (set by tags) to be broken
        piston_behavior <behavior: str> //piston behavior - must be "push", "destroy", "block", or "push_only"
        offset_type <type: str> //model offset within block - must be "none", "xz", or "xyz"
        no_block_break_particles //will not show particles when broken
        instrument <instrument: str> //what instrument a note block will play when placed above this block (or has a mob head on it) - see Named Properties for values
        replaceable [enable: bool, default true] //can be replaced by placing another block
        opaque [enable: bool, default true] //will not let light through
        map_color <map color: str> //sets the color this shows up as on a map - see Named Properties for values
        collidable <collidable: bool> //whether players can collide with this block
    }
    item [group=<group ID: str>] //children to this node are parsed as item settings (see below)
    render_layer <render layer name: str> //sets which render layer this is on: solid, cutout, cutout_mipped, or translucent
}

Block Types

All block types in Minecraft 1.21.1 are given a codec for defining any extra properties a certain type of block may have. While these codecs go unused in vanilla, Kdly Content uses them for defining which type of block will get created from a certain entry. Most vanilla block types have no special parameters.

Custom Blocks

The custom block type allows much more customization than a vanilla block type can provide.

Items

item <item name: str> { //register an item
    type <item generator type: str> //see below
    group <item group: str> //sets the item group this appears in
    settings {
        max_count <max count: num> //sets how many items fit in this stack (incompatible with maxDamage)
        max_damage <max damage: num> //sets how many hits of durability the item can take before breaking
        recipe_remainder <item ID: str> //sets what this item turns into when used in a crafting recipe
        rarity <rarity: str> //common, uncommon, rare, or epic
        fireproof //sets as fireproof like netherite
        equipment_slot <equipment slot: str> //sets which slot this item fits in: head, chest, legs, or feet
        component <component type: str> [component data: ?] //set a stack component - see below
    }
}

Item Stack Components

Item stack components are a Vanilla system that both structures item stack data consistently and can provide extra behavior to standard items without a specialized type. Kdly Content allows you to use JSON-in-KDL encoding for any stack components that require extra data - a stack component with a single string, number, or boolean value will include it as the second argument of the component node, and a stack component that requires a list or object will parse it from the node's children.

Item Generators

Item generators allow construction of specialized item types that may require extra logic a standard item does not provide.

  • standard: standard item
  • pickaxe, axe, shovel, how, or sword: tool of the specified type (requires custom properties)
type <tool type: str> { //any of the tool types listed above
    material <material ID: str> //the material of the tool - see Tool Materials below
}
  • armor: armor piece (requires custom properties)
type "armor" {
    material <material ID: str> //the material of the armor - see Armor Materials
    equipment_slot <slot: str> //the slot this armor fits in: head, chest, legs, feet, or body (wolf/horse armor)
}

Tool Materials

Tool materials are a top-level content type referenced in items.

toolMaterial <tool material name: str> { //create a new tool material
    max_damage <max damage: num> //how many uses the tool gets before it breaks
    mining_speed <speed: num> //how quickly the tool mines
    base_attack_damage <damage: num> //how much damage the tools do before type modifiers
    inverse_tag <tag: str> //the tag of items this material cannot mine
    enchantability <enchantability: num> //chance of getting good enchants
    repair_ingredient [<item id: str> ...] [tag=<tag name: str>] //items or tag used in an anvil to fix
}

Armor Materials

Armor materials are a top-level content type referenced in items.

armorMaterial <armor material name: str> { //create a new armor material
    defense { //armor points given for each piece
        helmet <defense: num> //helmet's defense
        chestplate <defense: num> //chestplate's defense
        leggings <defense: num> //leggings' defense
        boots <defense: num> //boots' defense
        body <defense: num> //wolf or horse armor's defense
    }
    toughness <toughness: num> //armor's armor toughness
    knockback_resistance <resistance: num> //armor's knockback resistance
    enchantability <enchantability: num> //chance of getting good enchants
    equip_sound <sound event ID: str> //sound played when armor equipped
    repair_ingredient [<item id: str> ...] [tag=<tag name: str>] //items or tag used in an anvil to fix
    layers { //array of texture layers to use for armor rendering - will default to the armor's ID if not present
        - <texture ID: str> [suffix=<texture suffix: str>] [dyeable=<dyeable: bool>]
    }
}

Require

The require node allows you to specify conditions that must be met for its children to be registered.

require mod=<mod ID: str> { //will only load items inside if the specified mod is loaded
    //put other top-level nodes in here
}

Dynamic Registries

Many features in modern Minecraft make use of dynamic or data-driven registries. These are typically written using JSON in a data pack, but Kdly Content allows you to use JSON-in-KDL encoding to define them in static data instead. All vanilla and modded dynamic registries are supported automatically, using a sanitized version of their data pack ID as the type key - a modded dynamic registry with the ID mymod:path/to/folder would be given the kdl type name mymod:path.to.folder. The type names for all vanilla dynamic registries are listed below.

Vanilla Dynamic Registry Types

  • dimension_type
  • worldgen.biome
  • chat_type
  • worldgen.configured_carver
  • worldgen.configured_feature
  • worldgen.placed_feature
  • worldgen.structure
  • worldgen.structure_set
  • worldgen.processor_list
  • worldgen.template_pool
  • worldgen.noise_settings
  • worldgen.noise
  • worldgen.density_function
  • worldgen.world_preset
  • worldgen.flat_level_generator_preset
  • trim_pattern
  • trim_material
  • wolf_variant
  • painting_variant
  • damage_type
  • worldgen.multi_noise_biome_source_parameter_list
  • banner_pattern
  • enchantment
  • enchantment_provider
  • jukebox_song
  • dimension