> For the complete documentation index, see [llms.txt](https://eurekabusiness.caiziii.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eurekabusiness.caiziii.com/zheng-he-bao-zuo-zhe/pack-integration.md).

# 整合包集成与调试

本文档面向整合包作者和测试人员。

## 推荐的整合流程

1. 使用目标 Minecraft `1.21.1` 与 NeoForge `21.1.x` 建立测试实例。
2. 安装 EurekaBusiness 及其声明的外部依赖。
3. 首次启动生成配置后，停止实例再编辑目录。
4. 在专用服务器测试商品发现、价格同步、顾客购买和世界重启恢复。
5. 将验证后的配置纳入整合包发行流程，并保留版本说明。

## 开发期重置

根项目提供 `resetRetailConfig` Gradle 任务，用于删除 `runs/` 下的开发目录配置，使目录在下一次启动时从代码种子生成：

```
gradlew resetRetailConfig
```

该命令面向 EurekaBusiness 开发环境。整合包发布者不应让玩家依赖这个 Gradle 任务，也不应在普通启动路径中自动清空用户配置。

## 服务端验证清单

* 目录更新后客户端看到的元素和价格与服务端快照一致。
* 未注册物品或元素不会发布为有效目录。
* 同款不同价时顾客优先前往低价基座。
* 交易失败不会只扣库存或只写入收益。
* 保存、重启和重连后目录、顾客状态与交易记录仍然一致。
* 关闭店铺时不再生成新顾客，已有顾客按关店流程完成或离店。

## 常见误区

* 不要把 `Documentation/` 或本 Wiki 当作运行时配置文件。
* 不要把 `.reference/` 内容作为发行资源或运行时依赖。
* 不要假设客户端传来的价格、物品或元素列表可信。
* 不要通过每 tick 扫描整个店铺来实现整合包逻辑；应使用配置更新、库存变化或明确的服务端事件。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://eurekabusiness.caiziii.com/zheng-he-bao-zuo-zhe/pack-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
