BuilderBaseWithType
Package: com.hypixel.hytale.server.npc.asset.builder
public abstract class BuilderBaseWithType<T> extends BuilderBase<T> implements ISpawnableAn abstract builder base that adds a Type string field to the standard BuilderBase. Used by builder categories that require a secondary type discriminator in addition to the factory type tag. Implements ISpawnable to participate in the spawning system.
Type Parameters
Section titled “Type Parameters”| Parameter | Description |
|---|---|
T | The runtime type this builder produces. |
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
type | String | The type string read from the JSON Type key. |
Methods
Section titled “Methods”readTypeKey
Section titled “readTypeKey”protected void readTypeKey(@Nonnull JsonElement data, String typeKey)Reads the type discriminator from the JSON data using the specified key name. Validates the value is a non-empty string via StringNotEmptyValidator.
protected void readTypeKey(@Nonnull JsonElement data)Reads the type discriminator using the default key "Type".
getType
Section titled “getType”public String getType()Returns the type string previously read from JSON.
readCommonConfig
Section titled “readCommonConfig”@Overridepublic Builder<T> readCommonConfig(JsonElement data)Delegates to BuilderBase.readCommonConfig.
Related Types
Section titled “Related Types”- BuilderBase — parent class
- Builder — root builder interface
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.