AssetTypeHandler
Package: com.hypixel.hytale.builtin.asseteditor.assettypehandler
public abstract class AssetTypeHandlerBase class for asset type handlers. Defines the contract for loading, unloading, and restoring assets of a specific type. Each handler is configured with an AssetEditorAssetType descriptor (id, icon, path, file extension, editor type).
Abstract Methods
Section titled “Abstract Methods”| Method | Description |
|---|---|
AssetLoadResult loadAsset(AssetPath, Path, byte[], AssetUpdateQuery, EditorClient) | Loads asset data into the runtime system |
AssetLoadResult unloadAsset(AssetPath, AssetUpdateQuery) | Removes a loaded asset |
AssetLoadResult restoreOriginalAsset(AssetPath, AssetUpdateQuery) | Restores an asset from its original on-disk state |
AssetUpdateQuery getDefaultUpdateQuery() | Returns the default rebuild cache configuration |
Convenience Methods
Section titled “Convenience Methods”| Method | Description |
|---|---|
AssetLoadResult loadAsset(AssetPath, Path, byte[], EditorClient) | Calls loadAsset with the default update query |
AssetLoadResult unloadAsset(AssetPath) | Calls unloadAsset with the default update query |
AssetLoadResult restoreOriginalAsset(AssetPath) | Calls restoreOriginalAsset with the default update query |
boolean isValidData(byte[]) | Validates raw data; default returns true |
AssetEditorAssetType getConfig() | Returns the asset type configuration |
Path getRootPath() | Returns the root path for this asset type |
Inner Enums
Section titled “Inner Enums”AssetLoadResult
Section titled “AssetLoadResult”public static enum AssetLoadResult { ASSETS_UNCHANGED, ASSETS_CHANGED, COMMON_ASSETS_CHANGED }| Value | Description |
|---|---|
ASSETS_UNCHANGED | No runtime changes occurred |
ASSETS_CHANGED | Server-side assets were modified |
COMMON_ASSETS_CHANGED | Common (client-distributed) assets were modified |
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.