跳到正文

GUI API Example Datapack

作者:Ghost

GUI API example datapack — demonstrates all GUI API features (Minecraft 26.2)

收藏

介绍

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

GUI API — Example Datapack

This datapack is a reference/showcase collection for the GUI API Fabric mod. It is not standalone content — it requires the guiAPI mod to be installed on the server.

Target version: Minecraft 26.2 (pack_format: 107)

Contents

  • welcome — Simple accept/decline menu demonstrating run_command and close actions.
  • admin_panel — Multi-button main menu: toggle state (PvP on/off), permission gating via condition (has_tag), left/right-click separation (click_type), and navigation to a sub-menu (open_gui).
  • sub_menu — Second-level menu linked from admin_panel, with open_gui used to navigate back.
  • counter — Variable system demo: set_var, add_var, sub_var, reset_var, conditional visibility (var_gt, var_set), and live updates via refresh.
  • macro_and_input_demo — In-GUI macros block, macro invocation via run_function, and player text input via anvil_input.
  • showcase — Multi-page menu (page, next_page, prev_page), on_open/on_close events, and scoreboard-backed variables (score:).
  • new_features_demo — Advanced features combined: auto-refresh via tick_rate, action delays, taking items from inventory (take_item), score manipulation (add_score/sub_score), effect management (add_effect/clear_effects), XP-level gating (level_gt/level_lt), and multi-value custom_model_data / item_model usage.

Usage

Load the datapack into your world, then open any GUI under the example namespace through guiAPI’s command system (e.g. example:welcome, example:admin_panel).

Note

This pack is intended for learning/reference purposes. Review commands like kick and gamemode creative before adapting them to a live server.

常见问题

GUI API Example Datapack 支持哪些 Minecraft 版本?

GUI API Example Datapack 支持 Minecraft Java 版 26.2。下载时注意选择和你游戏版本一致的文件。

GUI API Example Datapack 怎么安装?

新建世界时在「数据包」里把下载的 .zip 拖进去;已有的存档,把文件放进存档目录下的 datapacks 文件夹,进游戏输入 /reload 即可生效。服务器同样放在世界目录的 datapacks 里。

评论

登录后评论和评分

Ghost 的其他作品

查看全部 →