Skip to content

AssetTypeHandler

Package: com.hypixel.hytale.builtin.asseteditor.assettypehandler

public abstract class AssetTypeHandler

Base 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).

MethodDescription
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
MethodDescription
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
public static enum AssetLoadResult { ASSETS_UNCHANGED, ASSETS_CHANGED, COMMON_ASSETS_CHANGED }
ValueDescription
ASSETS_UNCHANGEDNo runtime changes occurred
ASSETS_CHANGEDServer-side assets were modified
COMMON_ASSETS_CHANGEDCommon (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.