Package: com.hypixel.hytale.server.npc.asset.builder
Implements the JSON-driven builder/factory system for NPC configuration. NPC roles are defined in JSON files under Server/NPC/Roles/. The BuilderManager loads these files, selects the appropriate BuilderFactory by category, and instantiates typed builders that read JSON, validate it, and produce runtime objects (Roles, Actions, Sensors, BodyMotions, HeadMotions, Instructions, etc.).
The package also provides the infrastructure for expression-evaluated parameters, state machine mapping, feature provider evaluation, slot allocation, and schema generation.
| Type | Kind | Description |
|---|
| Builder | interface | The root interface for all NPC asset builders. |
| BuilderBase | abstract class | Abstract base implementation with attribute reading infrastructure. |
| BuilderBaseWithType | abstract class | Adds a secondary Type field; implements ISpawnable. |
| SpawnableWithModelBuilder | abstract class | Extends BuilderBase for spawnable entities with models and dynamic dependencies. |
| BuilderComponent | class | Generic component wrapper; automatically registered by every factory. |
| Type | Kind | Description |
|---|
| BuilderFactory | class | Creates builders by type discriminator from a named registry. |
| BuilderManager | class | Central manager for loading, caching, validating, and hot-reloading builders. |
| BuilderInfo | class | Metadata about a loaded builder (index, name, path, validation state). |
| Type | Kind | Description |
|---|
| SlotMapper | class | Maps names to sequential integer slots. |
| ReferenceSlotMapper | class | Extends SlotMapper with lazily-created reference objects. |
| EventSlotMapper | class | Allocates event observation slots by type and set. |
| Type | Kind | Description |
|---|
| StateMappingHelper | class | Two-level state name/index mapping with validation. |
| StatePair | class | Immutable (fullStateName, mainIndex, subIndex) tuple. |
| Type | Kind | Description |
|---|
| FeatureOverride | enum | Three-state override for NPC builder features (On, Off, Default). |
| Type | Kind | Description |
|---|
| Feature | enum | Target types: Player, NPC, Drop, Position, Path. |
| FeatureEvaluatorHelper | class | Manages feature provider evaluation and requirements. |
| Type | Kind | Description |
|---|
| InstructionType | enum | Instruction contexts: Default, Interaction, Death, Component, StateTransitions. |
| ComponentContext | enum | Sensor contexts: SensorSelf, SensorTarget, SensorEntity. |
| InstructionContextHelper | class | Validates instruction/component context compatibility. |
This package has several sub-packages (documented separately):
expression — Expression types for dynamic JSON values (static and dynamic boolean, number, string, and array expressions).
holder — Typed value holder classes for validated field storage.
providerevaluators — Feature and parameter provider evaluators.
validators — Attribute and asset validators.
util — Utility classes.
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.