promotional bannermobile promotional banner

Easy Origins API

This is a api for the origins mod. It adds several new functions that can be used in origins that vastly improve what was possible before or straight up adds things unachievable beforehand.

EOrigins API

EOrigins API is a reusable Forge 1.20.1 addon for Origins and Apoli. It adds bounded entity queries, persistent target storage, movement utilities, projectile ownership tools and other building blocks that origin and datapack authors can use directly from JSON.

It does not replace Origins or Apoli, and it does not add a playable origin by itself. It extends Apoli's existing action and condition registries so custom origins can use additional eorigins_api:* factories alongside normal origins:* features.

Wiki - https://evehaddox.site/eapi/

Diagnostics

Operators can inspect the API without installing a separate profiling addon:

/eapi status
/eapi debug queries
/eapi debug storage <player>
/eapi debug reset

Query diagnostics report accumulated calls, spatial candidates, selected results, result-limit hits, average time and maximum time for API-owned queries. Storage diagnostics show named target, position and entity-set slots without printing raw UUIDs.

The debug commands require permission level 2.

Examples

Capture nearby living entities into a persistent set:

{
  "type": "eorigins_api:collect_entities",
  "slot": "example:targets",
  "mode": "replace",
  "radius": 16.0,
  "limit": 32,
  "shape": "sphere",
  "sort": "nearest",
  "include_self": false,
  "bientity_condition": {
    "type": "origins:target_condition",
    "condition": {
      "type": "origins:living"
    }
  }
}

Act on the currently loaded members later:

{
  "type": "eorigins_api:action_on_entity_set",
  "slot": "example:targets",
  "limit": 32,
  "same_dimension": true,
  "require_alive": true,
  "bientity_action": {
    "type": "eorigins_api:pull_target_toward",
    "strength": 1.25,
    "stop_distance": 1.5,
    "include_vertical": true,
    "set_velocity": true
  }
}

Use your own namespace for slot identifiers to prevent collisions with other datapacks.

Requirements

EOrigins API 0.5.0 targets:

  • Minecraft: 1.20.1
  • Forge: 47.4.10
  • Origins Forge: 1.10.0.9
  • Apoli Forge: 2.9.0.8
  • Calio Forge: 1.11.0.5
  • Caelus Forge: 3.1.0+1.20
  • Java: 17

Install EOrigins API and its dependencies on both the server and every client. The mod is intended for Forge; Fabric versions of Origins are not supported by this build.

The Easy Origins API Team

profile avatar
  • 3
    Projects
  • 340
    Downloads

More from Eve_Haddox