Skip to content

Datapack and mod developers guide

EpicSurg edited this page Apr 12, 2026 · 5 revisions

Adding evolution:

Evolution mechanic is implemented to origins upgrade feature. All you must do is to add "epicsorigins:end/draconic_evolution" advancement as a condition to upgrade an origin.

"upgrades": [
    {
        "condition": "epicsorigins:end/draconic_evolution",
        "origin": "origins_addon:custom_origin"
    }
]

New power types usage:

Look power:

Fields

Field Type Default Description
model_type Identifier Identifier of the model type that will be used.
texture_location Identifier Path to the location of your texture.
should_render Boolean true Determines should look be rendered by default.
key Key {"key": "key.epicsorigins.change_look"} Which active key this power should respond to.

Example:

{
    "type": "epicsorigins:player_look",
    "texture_location": "epicsorigins:textures/entity/player/custom_ears.png",
    "model_type": "epicsorigins:look/fox_ears"
}

All basic model types:

  • "epicsorigins:look/fox_ears"
  • "epicsorigins:look/fox_tail"
  • "epicsorigins:look/demon_horns"
  • "epicsorigins:look/demon_tail"
  • "epicsorigins:look/mermaid_tail"
  • "epicsorigins:look/wings"

Entity transformation power:

Fields

Field Type Default Description
active_by_default Boolean false Determines should the power be active by default.
changeable Boolean true Determines should the power be toggleable or not.
entity_type Identifier Entity type that player will transform to.
key Key {"key": "key.origins.primary_active"} Which active key this power should respond to.

Example:

{
    "type": "epicsorigins:entity_transformation",
    "entity_type": "minecraft:zombie",
    "active_by_default": true
}

Over time resource power:

Fields

Field Type Default Description
min Integer The minimum value of the resource.
max Integer The maximum value of the resource.
start_value Integer optional The value of the resource when the entity first receives the power. If not set, this will be set to the value of the min integer field.
decrement_speed Integer 1 The amount by which the value of the resource will decrease with each tick. If not set, this will be set to the value of the decrement_speed integer field.
increment_speed Integer optional The amount by which the value of the resource will increase with each tick.
hud_render Hud Render optional Determines how the resource is visualized on the HUD.
min_action Entity Action Type optional If specified, this action will be executed on the entity whenever the minimum value is reached.
max_action Entity Action Type optional If specified, this action will be executed on the entity whenever the maximum value is reached.
lost_action Entity Action Type optional If specified, this action will be executed on the entity whenever the power gets lost or the entity gets killed.
gain_action Entity Action Type optional If specified, this action will be executed on the entity whenever the power gets gained or the entity gets respawned.

Example:

{
  "type": "epicsorigins:over_time_resource",
  "max_action": {
    "type": "origins:set_on_fire",
    "duration": 5
  },
  "min_action": {
    "type": "origins:extinguish"
  },
  "condition": {
    "type": "origins:sprinting"
  },
  "min": 0,
  "max": 20,
  "start_value": 20,
  "decrement_speed": 2,
  "increment_speed": 1,
  "hud_render": {
    "should_render": false
  }
}

Wolf fear power:

If the entity has this power wolves will always attack you.

Fields

None.

Example:

{
  "type": "epicsorigins:wolf_fear"
}

Slime movement power:

If the entity has this power it will bounce from blocks and water like a slime.

Fields

None.

Example:

{
  "type": "epicsorigins:slime_movement"
}

New entity action types usage:

Grant ability action:

Fields

Field Type Default Description
ability Identifier The namespace and ID of the Player ability to be granted to the entity.
source Identifier The namespace and ID of the source of the power which grants the ability.

Example:

{
  "type": "epicsorigins:grant_ability",
  "ability": "minecraft:invulnerable",
  "source": "origins_addon:custom_origin"
}

Revoke ability action:

Fields

Field Type Default Description
ability Identifier The namespace and ID of the Player ability to be revoked from the entity.
source Identifier The namespace and ID of the source of the power which revokes the ability.

Example:

{
  "type": "epicsorigins:revoke_ability",
  "ability": "minecraft:invulnerable",
  "source": "origins_addon:custom_origin"
}

Creating additional models

To create a new model you must create your own java class that extends PlayerLookModelManager interface of the addon.

public class CustomModelManager implements PlayerLookModelManager {
    @override
    public void setAngles(LivingEntity entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch, PlayerLookModel<?> model) {
    }

    @override
    public boolean onRender(Pair<Identifier, List<String>> modelType, LivingEntity entity, PlayerLookModel<?> model) {
        return true;
    }

    @override
    public void addTexturedModelData(ModelData modelData) {
    }

    @override
    public void setVisible(boolean visible, PlayerLookModel<?> model) {
    }
}

In the addTexturedModelData method you can use addon's ModelPartData and add your custom model part to it.

In the setVisible method you must put visibility change functions of your custom model.

In the setAngles method you can create animations for your custom parts.

In the onRender method you can do changes in the model right before the rendering and return should the model part be rendered or not.

After that you must register your model manager using PlayerLookModelManagerRegistry. Write this in the onInitializeClient() method of your mod.

public class YourModClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        PlayerLookModelManagerRegistry.register(new CustomModelManager())
    }
}

Now your model is added to the game, but to use it in datapacks we need to register your model type which will show your model using ModelTypes util. Write this in the onInitialize() method of your mod.

public class YourMod implements ModInitializer {
    @Override
    public void onInitialize() {
        ModelTypes.register("look/your_identifier", List.of("first_part", "second_part", "custom_model_part"))
    }
}

First string is the identifier of your model type (it will be used in the look power in the model type field as "epicsorigins:look/your_identifier"). The second argument is the list path to the ModelPart which will be shown on the player if he has the power.

Clone this wiki locally