Datapack-owned gameplay
Abilities remain ordinary power JSON and functions. EAPI does not contain Gojo, Sukuna or another character’s combat logic.
Reusable combat geometry, model VFX, character attachments, projectiles, timelines and storage for Forge Origins—without hardcoding each character into the mod.
EOrigins API adds general-purpose Origins/Apoli factories. Your datapack defines the character, timing, damage and conditions; EAPI supplies synchronized visuals and safe reusable mechanics.
Abilities remain ordinary power JSON and functions. EAPI does not contain Gojo, Sukuna or another character’s combat logic.
Spawn GeckoLib models or configurable boxes, beams, walls and cubes. Attach cosmetics to posed body parts.
Zones, timelines, projectiles, VFX and storage use explicit caps and avoid chunk tickets or permanent markers.
for_each_entity_in_box.mods folder.world/datapacks/./reload for datapack-only edits.| Dependency | Target | Location |
|---|---|---|
| Minecraft | 1.20.1 | Client + server |
| Forge | 47.4.10 | Client + server |
| Origins Forge | 1.10.0.9 | Client + server |
| Apoli Forge | 2.9.0.8 | Client + server |
| Calio Forge | 1.11.0.5 | Client + server |
| GeckoLib Forge | 4.8.4 | Client + server |
| Java | 17 | Runtime |
Factories use the eorigins_api: namespace inside ordinary Origins JSON.
{
"type": "origins:active_self",
"key": { "key": "key.origins.primary_active" },
"entity_action": {
"type": "eorigins_api:spawn_vfx",
"vfx": "eorigins_api:primitive_box",
"duration_ticks": 30,
"forward_offset": 3.0,
"vertical_offset": 1.0,
"visual": {
"scale": [1.0, 1.0, 1.0],
"color": [0.1, 0.85, 1.0, 1.0],
"render_type": "solid",
"fullbright": true
}
}
}Add example:cyan_cube to the Origin’s powers array. Namespaced slot values are owner-local handles used to replace, cancel or inspect running effects.
spawn_vfx creates a synchronized temporary visual. Use eorigins_api:primitive_box for a colored cuboid with no custom model or resource pack.
{
"type": "eorigins_api:spawn_vfx",
"vfx": "eorigins_api:primitive_box",
"slot": "example:purple_beam",
"replace_existing": true,
"duration_ticks": 20,
"forward_offset": 8.0,
"vertical_offset": 1.0,
"use_view_pitch": true,
"follow_entity": false,
"rotate_with_entity": false,
"should_collide": false,
"visual": {
"scale": [0.75, 0.75, 16.0],
"color": [0.65, 0.08, 1.0, 0.82],
"render_type": "translucent",
"fullbright": true
}
}| Field | Purpose | Default / range |
|---|---|---|
| vfx | Namespaced visual ID. | Required |
| slot | Optional owner-scoped lifecycle handle. | None |
| duration_ticks | Server lifetime. | 20; 1–72000 |
| forward/side/vertical_offset | Local placement in blocks. | 0; −128–128 |
| use_view_pitch | Use vertical aim for placement and orientation. | false |
| follow_entity | Recalculate position from owner. | false |
| rotate_with_entity | Keep orientation attached after spawn. | false |
| visual.scale | XYZ scale; primitive values are block dimensions. | Definition value |
| visual.color | Normalized RGB or RGBA. | Definition value |
solid is opaque. translucent supports alpha and writes depth. translucent_emissive is a depthless overlay.
Use cancel_vfx, cancel_all_vfx and vfx_active. Named replacement is useful for charge stages.
translucent with fullbright: true. Large transparent effects can still sort roughly against water or ice.Primitive VFX, rectangular attack queries and physical colliders can share the exact same [width, height, local-Z length] dimensions and placement values.
for_each_entity_in_box performs an exact oriented query and runs a bi-entity action on every matched target.
should_collide: true turns primitive VFX into an oriented temporary entity collider. It defaults to false.
{
"type": "origins:and",
"actions": [
{
"type": "eorigins_api:spawn_vfx",
"vfx": "eorigins_api:primitive_box",
"duration_ticks": 6,
"forward_offset": 8.0,
"vertical_offset": 1.0,
"use_view_pitch": true,
"visual": {
"scale": [0.75, 0.75, 16.0],
"color": [0.65, 0.08, 1.0, 0.85],
"render_type": "translucent",
"fullbright": true
}
},
{
"type": "eorigins_api:for_each_entity_in_box",
"dimensions": [0.75, 0.75, 16.0],
"forward_offset": 8.0,
"vertical_offset": 1.0,
"use_view_pitch": true,
"limit": 64,
"bientity_action": {
"type": "eorigins_api:damage_target",
"damage_type": "minecraft:player_attack",
"amount": 8.0
}
}
]
}should_collide only blocks movement. Damage belongs in a query/action. Colliders do not place blocks, add mob pathfinding data or force-load chunks.visual_attachment renders GeckoLib VFX on a posed player body part without armor stands, equipped items or character-specific Java.
{
"type": "eorigins_api:visual_attachment",
"slot": "example:face_accessory",
"vfx": "eorigins_api:attachments/blindfold",
"anchor": "head",
"offset": [0.0, 0.1875, 0.0],
"rotation": [0.0, 0.0, 0.0],
"priority": 10,
"show_in_first_person": false,
"render_when_invisible": false,
"visual": {
"scale": [1.05, 1.05, 1.05],
"color": [0.035, 0.035, 0.05, 1.0],
"render_type": "cutout_no_cull",
"fullbright": false
},
"entity_condition": {
"type": "origins:power_active",
"power": "example:cosmetic_toggle"
}
}Anchors: root, head, body, back, left_arm, right_arm, left_leg, right_leg. Higher priority wins when powers compete for the same owner-local slot.
eorigins_api:attachments/blindfold is static; eorigins_api:attachments/wheel is animated.start_zone owns a bounded fixed or following area, tracks membership and fires enter/stay/exit actions without marker entities.
{
"type": "eorigins_api:start_zone",
"slot": "example:domain",
"duration_ticks": 400,
"interval": 10,
"replace_existing": true,
"placement": {
"forward_offset": -7.0,
"follow_entity": false
},
"query": {
"radius": 32.0,
"limit": 128,
"shape": "sphere",
"sort": "nearest",
"include_self": false
},
"actions": {
"enter_action": { "type": "example:entered" },
"stay_action": { "type": "example:stayed" },
"exit_action": { "type": "example:exited" }
}
}Use cancel_zone and zone_active for control. Fixed zones snapshot their center; following zones recalculate it from the owner.
A managed projectile is an invisible server-owned anchor with swept collision. Callbacks provide VFX, trails, damage and block effects.
{
"type": "eorigins_api:launch_managed_projectile",
"slot": "example:spell",
"speed": 1.5,
"lifetime_ticks": 100,
"hitbox_radius": 0.35,
"gravity": 0.0,
"drag": 1.0,
"max_entity_hits": 1,
"stop_at_blocks": true,
"require_owner": true,
"actions": {
"entity_action_on_tick": { "type": "example:trail" },
"bientity_action_on_entity_hit": { "type": "example:hit_target" },
"entity_action_on_block_hit": { "type": "example:block_impact" },
"entity_action_on_expiry": { "type": "example:expire" },
"entity_action_on_cancel": { "type": "example:cleanup" }
}
}Use cancel_managed_projectiles, action_on_managed_projectiles, managed_projectile and managed_projectile_count. Unloaded or out-of-border travel cancels safely.
Use a named timeline for charges, animations or multi-stage abilities that must be cancellable and clean up predictably.
{
"type": "eorigins_api:start_timeline",
"slot": "example:ability",
"replace_existing": true,
"cancel_on_dimension_change": false,
"continue_while": { "type": "example:ability_still_valid" },
"steps": [
{ "at_tick": 0, "entity_action": { "type": "example:start" } },
{ "at_tick": 10, "entity_action": { "type": "example:frame" } },
{ "at_tick": 30, "entity_action": { "type": "example:impact" } }
],
"entity_action_on_completed": { "type": "example:cleanup" },
"entity_action_on_canceled": { "type": "example:cleanup" }
}Ticks are absolute. Same-tick steps retain JSON order. Death/logout cancels, replacement runs old cleanup first, and continue_while is checked each tick.
Own an inert combat_interceptor power, then arm a named guard window. A matching incoming hit can be canceled and routed through victim, attacker and direct-source reactions.
{
"type": "eorigins_api:combat_interceptor",
"slot": "example:counter",
"priority": 0,
"cancel_damage": true,
"consume_charges": 1,
"allow_environmental": false,
"self_action": { "type": "example:on_block" },
"reverse_bientity_action": { "type": "example:victim_to_attacker" },
"reverse_direct_bientity_action": { "type": "example:victim_to_projectile" }
}{
"type": "eorigins_api:arm_combat_guard",
"slot": "example:counter",
"duration_ticks": 10,
"charges": 1
}eorigins_api:discard_projectile on a direct source. Generic discard can delete a melee attacker because the attacker is also the direct source.Select bounded targets by radius, view, cone, line or box while retaining actor attribution.
Collect, add, remove, iterate and test persistent per-owner relationships using namespaced slots.
Store expiring per-target integers and positions, plus owner checkpoints for domains and teleports.
Push, pull, swap or safely teleport an actor relative to a target.
Resolve owners, vehicles, passengers, leash holders, AI targets and recent damage sources.
damage_target and scaled_damage_target preserve the actor as damage source.
Datapacks can now give powers temporarily or permanently and disable a character’s entire power set without commands. Entity actions affect the current entity; bi-entity variants apply the same operation to the target.
grant_power and grant_power_to_target add an exact power/source pair. Set duration_ticks to a positive lifetime, or use 0 for a grant that remains until revoked.
suppress_all_powers and suppress_all_powers_on_target snapshot and remove top-level powers, including powers granted while suppression is active, then restore them safely.
{
"type": "eorigins_api:grant_power_to_target",
"power": "example:copied_technique",
"source": "example:copy_ability",
"duration_ticks": 600
}{
"type": "eorigins_api:suppress_all_powers_on_target",
"duration_ticks": 620
}| Operation | Self action | Target action |
|---|---|---|
| Grant exact power/source pair | grant_power | grant_power_to_target |
| Revoke exact power/source pair | revoke_power | revoke_power_from_target |
| Suppress all powers | suppress_all_powers | suppress_all_powers_on_target |
| Restore snapshot now | restore_all_powers | restore_all_powers_on_target |
source for each granting mechanic. Revocation removes the matching power/source pair; it does not remove unrelated copies of the same power.Prefix every ID below with eorigins_api:.
| Goal | Factories |
|---|---|
| World VFX | spawn_vfx, cancel_vfx, cancel_all_vfx, vfx_active |
| Character cosmetics | visual_attachment power |
| Spatial zones | start_zone, cancel_zone, zone_active |
| Geometry queries | for_each_entity_in_cone, for_each_entity_in_line, for_each_entity_in_box, for_each_entity_around_target |
| Entity collection | for_each_entity, entity_field, entity_count_in_range, action_on_entity_in_view |
| Entity sets | collect_entities, action_on_entity_set, clear_entity_set, add_to_entity_set, remove_from_entity_set, target_in_entity_set, entity_set_size |
| Target counters | modify_target_counter, target_counter, clear_target_counter, clear_target_counters |
| Positions | store_position, teleport_to_stored_position, matches_stored_pose, store_target_position, teleport_target_to_stored_position |
| Movement | push_target_away, pull_target_toward, teleport_actor_relative_to_target, swap_positions |
| Damage | damage_target, scaled_damage_target |
| Relations | action_on_relation, has_relation, entity_relation |
| Projectile ownership | projectile, projectile_has_owner, action_on_projectile_owner, projectile_owned_by_actor, set_projectile_owner, clear_projectile_owner, discard_projectile |
| Spell projectiles | launch_managed_projectile, cancel_managed_projectiles, action_on_managed_projectiles, managed_projectile, managed_projectile_count |
| Timelines | start_timeline, cancel_timeline, cancel_all_timelines, timeline_active |
| Combat guards | combat_interceptor power, arm_combat_guard, clear_combat_guard, combat_guard_active |
| Power control | grant_power, revoke_power, suppress_all_powers, restore_all_powers, plus the _to_target, _from_target and _on_target bi-entity variants |
Inspect query cost and active runtime state without exposing raw UUIDs.
/eapi status
/eapi debug queries
/eapi debug storage <player>
/eapi debug combat <player>
/eapi debug projectiles <player>
/eapi debug timelines <player>
/eapi debug zones <player>
/eapi debug vfx <player>
/eapi debug reset
/eapi vfx spawn <id> [duration_ticks]For example:charged_aura, place these files in a client resource pack. The definition connects the logical VFX ID to the model, texture and animation.
assets/example/eorigins/vfx/charged_aura.json
assets/example/geo/vfx/charged_aura.geo.json
assets/example/animations/vfx/charged_aura.animation.json
assets/example/textures/vfx/charged_aura.png{
"backend": "geckolib",
"model": "example:geo/vfx/charged_aura.geo.json",
"texture": "example:textures/vfx/charged_aura.png",
"animation": "example:animations/vfx/charged_aura.animation.json",
"animation_name": "animation.charged_aura.idle",
"loop": true,
"render_type": "translucent",
"fullbright": true,
"scale": [1.0, 1.0, 1.0],
"offset": [0.0, 0.0, 0.0],
"rotation": [0.0, 0.0, 0.0],
"color": [1.0, 1.0, 1.0, 1.0],
"shadow_radius": 0.0
}eorigins_api:primitive_box — cube, beam, slab, panel or wall.eorigins_api:malevolent_shrine — bundled Java-model bridge example.eorigins_api:incomplete_malevolent_shrine — animated GeckoLib example.eorigins_api:attachments/blindfold and attachments/wheel — reusable character attachments.