Skip to main content

Shared Data Types

These are complex data types that are referenced by multiple power types, actions, and conditions across Origins.


HudRender

Used by powers to display cooldown/resource bars in the HUD.

FieldTypeDefaultDescription
should_render_inactiveBooleantrueWhether to render when the resource is full/empty
sprite_locationIdentifierorigins:textures/gui/resource_bar.pngTexture for the bar
bar_indexInteger0Index of the bar in the sprite sheet
icon_indexInteger0Index of the icon in the sprite sheet
conditionEntity ConditionoptionalCondition for rendering the HUD element
invertedBooleanfalseIf true, inverts the bar direction
orderInteger0Render order among multiple HUD elements

Key

Key binding settings.

FieldTypeDefaultDescription
keyStringkey.origins.primary_activeKey binding ID
continuousBooleanfalseWhether the key is treated as held continuously

Modifier

A mathematical modifier applied to numeric values.

FieldTypeDefaultDescription
valueFloatrequiredModifier value
operationStringadd_base_earlyOperation: add_base_early, multiply_base_additive, multiply_base_multiplicative, multiply_total_additive, multiply_total_multiplicative
resourceIdentifieroptionalResource to use as the modifier value
modifierModifieroptionalSub-modifier applied to the resource value

AttributeEntry

An attribute modifier entry.

FieldTypeDefaultDescription
attributeIdentifierrequiredAttribute ID (e.g. minecraft:generic.max_health)
operationStringrequiredOperation: add_value, add_multiplied_base, add_multiplied_total
valueFloatrequiredModifier value
nameStringoptionalCustom name for the modifier

PositionedItemStack

An item stack with an optional inventory slot position.

FieldTypeDefaultDescription
stackItem StackrequiredThe item stack
slotIntegeroptionalInventory slot index to place the item into

ColorSettings

RGBA color configuration.

FieldTypeDefaultDescription
redFloatoptionalRed channel (0-1)
greenFloatoptionalGreen channel (0-1)
blueFloatoptionalBlue channel (0-1)
alphaFloatoptionalAlpha channel (0-1)
colorIntegeroptionalARGB color as a single hex integer (0xAARRGGBB)