跳到正文

InteractAPI

作者:Raiiiden

InteractAPI allows immersive key prompts for mod and modpack developers to use.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

InteractAPI

A lightweight library for customizable world-space interaction prompts and quick time events.

InteractAPI provides a display layer for other mods to render floating interaction icons, key prompts, and interactive QTE sequences directly in the world.

Minecraft Forge

Side Java


Features

  • World-space interaction prompts attached to blocks, entities, or arbitrary positions
  • Customizable textures, scale, color, opacity, and render distance
  • Camera-facing billboards or fixed world orientations
  • Automatic positioning for moving entities and block entities
  • Smooth distance fading and optional full-bright rendering
  • Optional see-through-wall rendering
  • Custom text labels and progress indicators
  • Dynamic keybind icons that update when players rebind their controls
  • Controller button icons and alternate input layouts
  • Built-in prompt animations and press feedback
  • Automatic prompt cleanup when targets become invalid or worlds unload

Quick Time Events

InteractAPI also includes a built-in QTE system for creating interactive sequences and button-mashing challenges.

  • Mash Events – Repeatedly press a key to fill a progress meter before time runs out.
  • Sequence Events – Press a series of displayed keys before their timers expire.
  • Arcade Style – Bright effects, animations, sound effects, and rewarding feedback.
  • Horror Style – Darkened visuals, heartbeat effects, screen distortion, and increasingly intense feedback.
  • Custom Results – Receive success, failure, cancellation, score, hit counts, and timing information.

Accessibility

Players can customize QTE difficulty through client settings:

  • Hold instead of repeatedly mashing a key
  • Increase event duration with a time multiplier
  • Automatically complete QTEs

Designed for Developers

InteractAPI is a rendering and presentation library. It intentionally does not decide when an interaction should happen.

For ordinary prompts, InteractAPI:

  • Does not read key presses
  • Does not perform raycasts
  • Does not activate blocks or entities
  • Does not send network packets
  • Does not determine whether a target is interactable

Your mod handles all interaction logic and tells InteractAPI when and where to display a prompt.

The API supports persistent and temporary prompts, reusable prompt IDs, dynamic anchors, and thread-safe registration.

QTEs are a separate feature that handle their own input during an active event and return the result to your mod.


Compatibility

Requirement Version
Minecraft 1.20.1
Forge 47.x
Java 17

Installation for Developers

Add InteractAPI as a dependency in your project.

dependencies {
    implementation fg.deobf("com.raiiiden.interactapi:interactapi:1.20.1-1.0.0")
}

Declare the dependency in your mods.toml:

[[dependencies.yourmodid]]
    modId="interactapi"
    mandatory=true
    versionRange="[1.0.0,)"
    ordering="AFTER"
    side="BOTH"

Credits and Support

Developed by Zarra Studios.

For support, bug reports, or questions about integrating InteractAPI into your mod, join the Discord.

Discord More Links Patreon

常见问题

InteractAPI 支持哪些 Minecraft 版本?

InteractAPI 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。

InteractAPI 怎么安装?

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

评论

登录后评论和评分

Raiiiden 的其他作品

查看全部 →