BuilderCombatConfig
Package: com.hypixel.hytale.server.npc.asset.builder
public class BuilderCombatConfig extends BuilderCodecObjectHelper<String>A codec object helper specialized for NPC combat configuration. Reads a combat config reference (either inline JSON object or a string reference to a BalanceAsset) and supports runtime override via ExecutionContext.getCombatConfig().
Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
inline | boolean | Whether the config was provided as an inline JSON object rather than a string reference. |
Constructor
Section titled “Constructor”public BuilderCombatConfig(Codec<String> codec, Validator<String> validator)Methods
Section titled “Methods”public String build()Throws UnsupportedOperationException. Use build(ExecutionContext) instead.
@Nullablepublic String build(@Nonnull ExecutionContext context)Returns the combat config string. If the execution context provides an override via getCombatConfig(), that value is used; otherwise the value read from JSON is returned.
readConfig
Section titled “readConfig”@Overridepublic void readConfig(@Nonnull JsonElement data, @Nonnull ExtraInfo extraInfo)Records whether the config is inline, then delegates to the parent codec reader.
validate
Section titled “validate”public boolean validate(String configName, NPCLoadTimeValidationHelper loadTimeValidationHelper, @Nonnull ExecutionContext context, @Nonnull List<String> errors)Validates that any override combat config string refers to an existing BalanceAsset.
Related Types
Section titled “Related Types”- BuilderCodecObjectHelper — parent class
- BuilderModifier — can provide
_CombatConfigoverrides
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.