BuilderComponent
Package: com.hypixel.hytale.server.npc.asset.builder
public class BuilderComponent<T> extends BuilderBase<T>A generic builder that wraps a BuilderObjectReferenceHelper to read a "Content" JSON object. Used when a builder category needs a simple wrapper around a referenced or inline component. Every BuilderFactory automatically registers a "Component" type that creates a BuilderComponent.
Type Parameters
Section titled “Type Parameters”| Parameter | Description |
|---|---|
T | The runtime type this component produces. |
Constructor
Section titled “Constructor”public BuilderComponent(Class<T> classType)Methods
Section titled “Methods”@Overridepublic T build(@Nonnull BuilderSupport builderSupport)Delegates to the inner BuilderObjectReferenceHelper.build().
category
Section titled “category”@Overridepublic Class<T> category()Returns the class type passed to the constructor.
readConfig
Section titled “readConfig”@Nonnull@Overridepublic Builder<T> readConfig(@Nonnull JsonElement data)Reads a "Content" JSON object into the internal reference helper.
validate
Section titled “validate”@Overridepublic boolean validate(String configName, @Nonnull NPCLoadTimeValidationHelper validationHelper, @Nonnull ExecutionContext context, Scope globalScope, @Nonnull List<String> errors)Validates both this builder and the inner reference helper.
canRequireFeature
Section titled “canRequireFeature”@Overridepublic boolean canRequireFeature()Returns true if T is assignable from Action or Motion.
toSchema
Section titled “toSchema”@Nonnull@Overridepublic Schema toSchema(@Nonnull SchemaContext context)Adds Class, Interface, Default, DefaultState, and ResetOnStateChange properties to the schema.
Related Types
Section titled “Related Types”- BuilderBase — parent class
- BuilderObjectReferenceHelper — handles the reference resolution
- BuilderFactory — automatically registers this as the
"Component"type
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.