Skip to content

JsonTypeHandler

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

public abstract class JsonTypeHandler extends AssetTypeHandler

Abstract handler for JSON-based asset types. Parses raw byte[] data as UTF-8 JSON into a BsonDocument, then delegates to the abstract loadAssetFromDocument() method. Validates JSON data by attempting to parse it with RawJsonReader.

Subclass: AssetStoreTypeHandler.

MethodDescription
AssetLoadResult loadAssetFromDocument(AssetPath, Path, BsonDocument, AssetUpdateQuery, EditorClient)Loads a parsed BSON document into the runtime
MethodDescription
loadAsset(AssetPath, Path, byte[], AssetUpdateQuery, EditorClient)Parses JSON to BsonDocument and delegates to loadAssetFromDocument
boolean isValidData(byte[])Validates JSON structure via RawJsonReader.validateBsonDocument()
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.