-
Notifications
You must be signed in to change notification settings - Fork 0
Datapack and mod developers guide
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"
}
]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"
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
}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())
}
}