-
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
}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 | optional | The amount by which the value of the resource will decrease with each tick. |
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
}
}If the entity has this power wolves will always attack you.
Fields
None.
Example:
{
"type": "epicsorigins:wolf_fear"
}If the entity has this power it will bounce from blocks and water like a slime.
Fields
None.
Example:
{
"type": "epicsorigins:slime_movement"
}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"
}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"
}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())
}
}