BuilderInfo
Package: com.hypixel.hytale.server.npc.asset.builder
public class BuilderInfoMetadata about a loaded NPC builder. Tracks the builder’s index in the BuilderManager cache, its key name, the file path it was loaded from, and its current validation state.
Inner Types
Section titled “Inner Types”State (enum)
Section titled “State (enum)”protected static enum State| Constant | Description |
|---|---|
NEEDS_RELOAD | The file has changed and the builder must be re-read. |
NEEDS_VALIDATION | The builder has been read but not yet validated. |
VALID | Validation succeeded. |
INVALID | Validation failed. |
REMOVED | The builder has been unloaded. |
Constructor
Section titled “Constructor”public BuilderInfo(int index, String keyName, Builder<?> builder, Path path)Initial state is NEEDS_VALIDATION.
Methods
Section titled “Methods”getIndex / getKeyName / getBuilder / getPath
Section titled “getIndex / getKeyName / getBuilder / getPath”public int getIndex()public String getKeyName()public Builder<?> getBuilder()public Path getPath()isValidated
Section titled “isValidated”public boolean isValidated()Returns true if the state is VALID or INVALID.
isValid
Section titled “isValid”public boolean isValid()Returns true only if the state is VALID.
setValidated
Section titled “setValidated”public boolean setValidated(boolean success)Sets the state to VALID or INVALID based on the argument and returns the same boolean.
setForceValidation / setNeedsValidation / setNeedsReload
Section titled “setForceValidation / setNeedsValidation / setNeedsReload”public void setForceValidation()public void setNeedsValidation()public void setNeedsReload()State transition methods. setNeedsValidation and setNeedsReload are no-ops if the builder is REMOVED.
canBeValidated
Section titled “canBeValidated”public boolean canBeValidated()Returns true if the state is not NEEDS_RELOAD or REMOVED.
needsValidation
Section titled “needsValidation”public boolean needsValidation()Returns true if the state is NEEDS_VALIDATION.
setRemoved / isRemoved
Section titled “setRemoved / isRemoved”public void setRemoved()public boolean isRemoved()Related Types
Section titled “Related Types”- BuilderManager — owns the builder cache containing these info objects
- Builder — the builder instance stored in this info
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.