Skip to content

BuilderInfo

Package: com.hypixel.hytale.server.npc.asset.builder

public class BuilderInfo

Metadata 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.

protected static enum State
ConstantDescription
NEEDS_RELOADThe file has changed and the builder must be re-read.
NEEDS_VALIDATIONThe builder has been read but not yet validated.
VALIDValidation succeeded.
INVALIDValidation failed.
REMOVEDThe builder has been unloaded.
public BuilderInfo(int index, String keyName, Builder<?> builder, Path path)

Initial state is NEEDS_VALIDATION.

getIndex / getKeyName / getBuilder / getPath

Section titled “getIndex / getKeyName / getBuilder / getPath”
public int getIndex()
public String getKeyName()
public Builder<?> getBuilder()
public Path getPath()
public boolean isValidated()

Returns true if the state is VALID or INVALID.

public boolean isValid()

Returns true only if the state is VALID.

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.

public boolean canBeValidated()

Returns true if the state is not NEEDS_RELOAD or REMOVED.

public boolean needsValidation()

Returns true if the state is NEEDS_VALIDATION.

public void setRemoved()
public boolean isRemoved()
  • 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.