Skip to main content

Other Type Families

These built-in registries share the same rules as actions and conditions: a datapack selects an existing entry through a type field but can never add one. Where a family has no JSON fields, the type ID alone is the whole entry.


trigger_type

Trigger matchers decide which runtime events an ability or a breakthrough condition reacts to. Each built-in trigger is a fieldless matcher; the registry entry itself supplies the signal identifier it compares against.

typeDescription
mxt:tickA periodic entity tick
mxt:attackThe entity attacked another entity
mxt:hurtThe entity took damage
mxt:killThe entity killed another entity
mxt:block_breakThe entity broke a block
mxt:block_useThe entity used a block
mxt:item_useThe entity finished using an item
mxt:equipThe entity's equipment changed
mxt:deathThe entity died
mxt:breakthroughThe entity completed a breakthrough
{"type": "mxt:triggered", "triggers": [{"type": "mxt:item_use"}]}

None of the built-in triggers has additional fields. Server scripts can publish custom trigger signals with their own IDs; see the KubeJS API Reference.


cost_type

A cost can be checked and then consumed from a player.

typeFieldsDescription
mxt:resourceresource, amountConsumes a datapack resource from the player's resource attachment
mxt:itemitems, amountConsumes matching items from the player's inventory

mxt:resource:

FieldTypeDefaultDescription
resourceHolder<resource>requiredThe resource to consume
amountNumberProviderrequiredAmount to consume; must evaluate to a finite positive number

mxt:item:

FieldTypeDefaultDescription
itemsItemMatcherrequiredWhich items may be consumed; see ItemMatcher
amountNumberProviderrequiredNumber of matching items to consume, rounded up; a non-positive or non-finite result means the cost cannot be paid
{"type": "mxt:item", "items": "#minecraft:logs", "amount": 8}

A costs array also accepts the plain {"id": ..., "amount": ...} shorthand, which is read as mxt:resource. The shorthand is kept for compatibility; new entries should write the type explicitly.


badge_type

Badges are reserved display metadata. They load and validate, but no compendium, selection screen or gameplay object consumes them yet.

typeFieldsDefaultDescription
mxt:emptynone-Empty placeholder badge
mxt:spritespriterequiredShows a texture only
mxt:tooltipsprite, texttext is an empty textA texture with a hover tooltip
mxt:keybindsprite, text, keytext="", key="key.mxt.primary_active"Records a client key mapping
mxt:crafting_recipesprite, recipe, from_power, prefix, suffixfrom_power=falseReserved recipe hint metadata
{
"type": "mxt:tooltip",
"sprite": "mxt:textures/gui/badge/info.png",
"text": "badge.example.info"
}

ability_type

The nested ability object of an ability definition uses this registry. The ID is written as ability.type.

typeFieldsDescription
mxt:emptynoneNo lifecycle of its own
mxt:activeslotFired explicitly from a hotbar slot
mxt:triggeredtriggers, chanceFired when one of its triggers matches
mxt:modifierquery_tagsPassive modifier ability addressed through query tags
mxt:aurainterval, radiusRepeats around the actor on an interval
mxt:channelledtick_interval, upkeep_costsRuns once on activation and then once per interval while its upkeep is paid
mxt:compositeabilities, all_requiredDelegates to child abilities rather than acting itself
mxt:wordeffect, requires_operator, amountTerminal, code-whitelisted word effect
typeFieldTypeDefaultDescription
mxt:activeslotStringprimaryHotbar slot name; must not be blank
mxt:triggeredtriggersList of Trigger[]Trigger matchers that fire this ability
mxt:triggeredchanceNumberProvider1Chance that a matching trigger actually fires
mxt:modifierquery_tagsList of Identifier[]Tags used to query this modifier ability
mxt:auraintervalNumberProvider20Ticks between aura applications
mxt:auraradiusNumberProvider4Aura radius
mxt:channelledtick_intervalNumberProvider1Ticks between upkeep payments
mxt:channelledupkeep_costsList of ResourceCost[]Resources paid on every upkeep tick
mxt:compositeabilitiesList of Holder<ability>requiredChild abilities; invalid optional entries are ignored
mxt:compositeall_requiredBooleantrueWhen false, only the first child runs
mxt:wordeffectEnumrequiredself_heal or purge_self_curses
mxt:wordrequires_operatorBooleantrueWhether the actor must be an operator
mxt:wordamountNumberProvider0Magnitude passed to the word effect

mxt:empty has no fields. mxt:word is a terminal payload that never executes target behaviour, and datapacks cannot supply an arbitrary command string for it.

{
"ability": {
"type": "mxt:channelled",
"tick_interval": 20,
"upkeep_costs": [{"id": "example:qi", "amount": 1}]
}
}

ability_component_type

Components add cooldown, charge, toggle, timer and targeting state to an ability.

typeFieldsDescription
mxt:emptynoneNo state component
mxt:cooldownticksAdds a plain cooldown
mxt:chargesmaximum, recharge_ticksAdds limited charges that recharge over time
mxt:toggledefaultAdds an on/off state
mxt:timerdurationAdds a running duration
mxt:resourceresourceTies the component state to a resource
mxt:target_lockrangeLocks onto a target within a range
typeFieldTypeDefaultDescription
mxt:cooldownticksNumberProviderrequiredCooldown length in ticks
mxt:chargesmaximumNumberProviderrequiredMaximum number of charges
mxt:chargesrecharge_ticksNumberProviderrequiredTicks needed to regain one charge
mxt:toggledefaultBooleanfalseInitial toggle state
mxt:timerdurationNumberProviderrequiredTimer length in ticks
mxt:resourceresourceHolder<resource>requiredThe resource backing this component
mxt:target_lockrangeNumberProviderrequiredMaximum lock-on range
{"type": "mxt:charges", "maximum": 3, "recharge_ticks": "100 - level * 5"}

ability_target_selector_type

Selects which entities an ability's bi-entity behaviour applies to.

typeFieldsDescription
mxt:selfnoneSelects only the ability actor
mxt:arearadius, include_actorSelects entities in an actor-centred area
FieldTypeDefaultDescription
radiusNumberProviderrequiredArea radius, capped at 128; a negative or non-finite value selects nothing
include_actorBooleanfalseWhether the actor is included in the selection
{"type": "mxt:area", "radius": 6, "include_actor": true}

curse_type

The type of a curse definition selects its lifecycle policy. All four types are fieldless; the duration itself comes from the duration_ticks field of the curse definition.

typeDescription
mxt:timedExpires after the configured duration; the duration must be positive
mxt:permanentNever expires
mxt:triggeredApplication and removal are driven by the owning event bridge; a non-positive duration means no expiry
mxt:emptyNo lifecycle at all
{"type": "mxt:timed", "duration_ticks": 600}

resource_bar_context

A context extracts the value, minimum, maximum and last-changed tick for a bar, and decides its layout and display name. Unlike the other families, a context is selected by ID string, not by a type object, and it is written into the context field of an inline resource bar. Contexts have no JSON fields and can only be extended from Java or KubeJS.

IDDescription
mxt:self_hudSelf HUD layout; reads the resource stored on the entity
mxt:target_overlayTarget overlay layout; reads the resource stored on the entity
mxt:boss_overlayBoss overlay layout; reads the resource stored on the entity
mxt:environment_concentrationSelf HUD layout; reads the environmental aura template only, on the client
mxt:actual_concentrationSelf HUD layout; reads the fully resolved concentration, on the client
{
"bars": [
{
"context": "mxt:self_hud",
"anchor": "left",
"renderer": {"type": "mxt:boss_bar", "bar_index": 1}
}
]
}

The concentration contexts report no values until the client has received aura data, and they are named after the resource, so resource.example.qi=Spirit Qi is displayed as environmental or actual aura concentration for that resource.


resource_bar_render_data_type

The renderer field of a resource bar selects one of these draw modes. Unless a mode overrides the size, the default footprint is 71x8.

typeFieldsDescription
mxt:boss_barsprite_location, bar_index, icon_index, invertedOrigins-style 71x8 bar with an icon
mxt:textured_barbackground_sprite, fill_sprite, width, height, fill_color, show_valueTwo independent textures
mxt:segmented_barsegments, gap, full_color, empty_colorDiscrete segments
mxt:radial_barradius, thickness, start_angle, end_angle, fill_colorRadial bar
mxt:text_onlyformat, color, show_maximumText only
mxt:missingnonePlaceholder render data with no visuals
typeFieldTypeDefaultDescription
mxt:boss_barsprite_locationIdentifiermxt:textures/gui/resource_bar.pngSprite sheet
mxt:boss_barbar_indexInteger0Bar index in the sheet, 0..24
mxt:boss_baricon_indexIntegerbar_indexIcon index in the sheet, 0..24
mxt:boss_barinvertedBooleanfalseReverses the fill direction
mxt:textured_barbackground_spriteIdentifierrequiredBackground texture
mxt:textured_barfill_spriteIdentifierrequiredFill texture
mxt:textured_barwidthIntegerrequiredWidth, 1..1024
mxt:textured_barheightIntegerrequiredHeight, 1..1024
mxt:textured_barfill_colorRGB color#FFFFFFFill tint
mxt:textured_barshow_valueBooleanfalseWhether the numeric value is drawn
mxt:segmented_barsegmentsIntegerrequiredNumber of segments, 1..256
mxt:segmented_bargapInteger1Gap between segments, 0..32
mxt:segmented_barfull_colorRGB color#FFFFFFColor of a filled segment
mxt:segmented_barempty_colorRGB color#555555Color of an empty segment
mxt:radial_barradiusIntegerrequiredRadius, 1..512
mxt:radial_barthicknessIntegerrequiredThickness, 1..128
mxt:radial_barstart_angleDouble0Start angle in degrees
mxt:radial_barend_angleDouble360End angle in degrees
mxt:radial_barfill_colorRGB color#FFFFFFFill tint
mxt:text_onlyformatString%current%Text format
mxt:text_onlycolorRGB color#FFFFFFText color
mxt:text_onlyshow_maximumBooleanfalseWhether the maximum is shown next to the value

A segmented bar is segments * 8 + (segments - 1) * gap pixels wide, and a radial bar occupies radius * 2 + thickness pixels in both directions. Colors accept #RRGGBB or an integer from 0 to 16777215. Rendering runs on the client and only ever displays server-synchronized resource values.

{"type": "mxt:segmented_bar", "segments": 10, "gap": 2, "full_color": "#66CCFF"}

resource_bar_visibility_type

Visibility is a pure display policy: it decides whether a bar is drawn and never affects resource accounting.

typeFieldsDescription
mxt:alwaysnoneAlways visible
mxt:non_fullnoneVisible while the current value is below the maximum
mxt:non_zerononeVisible while maximum - minimum is positive, and hidden when the difference is zero or negative
mxt:recently_changedhold_ticksVisible for a while after the value last changed
mxt:resource_rangemin, maxVisible while the current value is inside a range
mxt:andvaluesVisible when every nested visibility is visible
mxt:orvaluesVisible when any nested visibility is visible
mxt:notvalueInverts a nested visibility
typeFieldTypeDefaultDescription
mxt:recently_changedhold_ticksLong60Ticks to keep the bar visible after a change; must be non-negative
mxt:resource_rangeminDoublerequiredInclusive lower bound; must be finite
mxt:resource_rangemaxDoublerequiredInclusive upper bound; must be finite and not below min
mxt:andvaluesList of ResourceBarVisibilityrequiredThe nested visibilities
mxt:orvaluesList of ResourceBarVisibilityrequiredThe nested visibilities
mxt:notvalueResourceBarVisibilityrequiredThe nested visibility to invert
{
"type": "mxt:and",
"values": [
{"type": "mxt:non_full"},
{"type": "mxt:resource_range", "min": 1, "max": 50}
]
}

resource_value_provider_type

A resource value provider resolves one number for a resource, usually for a resource bar or for script evaluation.

typeFieldsDescription
mxt:currentnoneThe value stored on the entity
mxt:maxnoneThe max of the resource definition
mxt:regennoneThe regen of the resource definition
mxt:missingnoneThe amount missing to the maximum, never below 0
mxt:environment_concentrationnoneThe environmental template concentration at the position, excluding chunk storage and block or formation contributions
mxt:actual_concentrationnoneThe final resolved concentration at the position, including every active source
mxt:constantvalueA fixed NumberProvider
mxt:jsid, paramsA KubeJS resource value callback
typeFieldTypeDefaultDescription
mxt:constantvalueNumberProviderrequiredThe value to resolve
mxt:jsidStringrequiredCallback ID registered with MxtValues.resourceValue(...)
mxt:jsparamsObject{}Arbitrary JSON passed to the callback

The two concentration providers read world state and therefore need the owning entity; called without one they resolve to 0. A missing mxt:js callback logs a warning and resolves to 0.

{"type": "mxt:constant", "value": "level * 10"}

aura_maximum_type

This registry resolves the environmental storage limit of one aura chunk. Block contributions and formation bonuses are applied separately at runtime.

typeFieldsDescription
mxt:fixedvalueA fixed maximum
mxt:initial_multipliermultiplierThe initial aura of the chunk multiplied by a factor
mxt:unlimitednoneNo upper limit
typeFieldTypeDefaultDescription
mxt:fixedvalueDoublerequiredFixed maximum, 0 or greater
mxt:initial_multipliermultiplierDouble1Factor applied to the non-negative initial aura

A bare non-negative number is shorthand for {"type": "mxt:fixed", "value": ...}. Omitting the field entirely on the owning definition means the maximum equals the initial environmental aura of the chunk.

{"type": "mxt:initial_multiplier", "multiplier": 2}

item_matcher_entry_type

These entries make up an ItemMatcher. An item ID and an item tag also have shorthand forms that omit type.

typeFieldsDescription
mxt:itemitemMatches one exact item
mxt:tagtagMatches every item in an item tag
mxt:wildcardpatternMatches item IDs with * and ? wildcards
mxt:regexpatternMatches item IDs with a regular expression
typeFieldTypeDefaultDescription
mxt:itemitemIdentifierrequiredItem registry ID; the shorthand form is the bare ID string
mxt:tagtagItem tag IDrequiredTag reference; the shorthand form is the #-prefixed string
mxt:wildcardpatternStringrequired* matches any run of characters and ? matches one character; must not be empty
mxt:regexpatternStringrequiredA full regular expression matched against the item ID; must not be empty

Wildcard and regex entries are matched against the item ID, such as minecraft:apple, not against display names.

"items": [
"minecraft:apple",
{"type": "mxt:wildcard", "pattern": "minecraft:*_sword"},
{"type": "mxt:regex", "pattern": "othermod:(ruby|jade)_gem"}
]