> 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/eurekabusinesscommunity-en/addon-developers/addon-api-overview.md).

# Addon API Overview

This document provides development guidelines for NeoForge addon authors extending EurekaBusiness.

## Baseline Constraints

* Target environment: Minecraft `1.21.1` and NeoForge `21.1.x`;
* Depend on `Core` for public contracts, and `Retail` or `Restaurant` for specific domain modules;
* Respect registration lifecycles and physical side boundaries;
* Do not import `internal` packages; never store authoritative server state in client classes.

## Extension Points

### Core Extensions

* Use `ElementRegistrar` to declare domain-neutral elemental aspects;
* Use `CustomerVariantRegistrar` to register customer models, portraits, rarity algorithms, and purchase limits;
* Extend `ElementRarityAlgorithm` to evaluate shop element profiles;
* Implement `CustomerContinuePurchaseAlgorithm` or extend `ElementContinuePurchaseAlgorithm` to define custom shopping persistence.

### Retail Extensions

Retail catalogs, pedestal logic, and trading rules are encapsulated in `Retail`. Addons should interact through public Retail contracts rather than mutating `ValueCatalogSnapshot` or customer entity fields directly.

## Server Authority Principles

All client requests must be validated on the server. Never trust client-supplied item stacks, price amounts, element levels, or target block positions.

## Algorithm Constraints

Rarity and continue-purchase algorithms must be pure, side-effect-free calculations. They read an immutable context and return probability floats or integer limits. Never scan world blocks, mutate inventories, broadcast network packets, or advance entity AI within an algorithm call.

## Verification Requirements

Addon developers should verify:

* Common sources compile cleanly without importing client-only packages;
* Dedicated server boots cleanly without client classes on the classpath;
* Duplicate IDs, unknown elements, and malformed entries fail fast with clear diagnostics;
* Game saves, server restarts, and reconnects correctly preserve custom variant IDs.


---

# 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/eurekabusinesscommunity-en/addon-developers/addon-api-overview.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.
