跳到正文

Easy Origins API

作者:Eve_Haddox

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.

常见问题

Easy Origins API 支持哪些 Minecraft 版本?

Easy Origins API 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

Easy Origins API 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

Eve_Haddox 的其他作品

查看全部 →