Runtime helper for embedding and exposing Hytale Asset Editor packs inside plugins.
AssetBridge is a lightweight runtime library that lets you bundle asset packs directly inside your plugin jar and have them:
- Properly ordered during runtime
- Visible inside the Hytale Asset Editor
- Asset Editor compatibility out of the box
- Early asset-pack ordering support
- Fully configurable runtime behavior
- Plug-and-play integration
repositories {
mavenCentral()
maven {
name = 'AzureDoom Maven'
url = uri("https://maven.azuredoom.com/mods")
}
}
dependencies {
implementation 'com.azuredoom.hytale:hytale-asset-editor-runtime:0.2.0'
}tasks.jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from {
configurations.runtimeClasspath
.filter { it.name.endsWith('.jar') }
.collect { zipTree(it) }
}
}plugins {
id 'java'
id 'com.azuredoom.hytale-tools' version '1.0.16'
}When using hytale-tools, AssetBridge is integrated automatically.
You do NOT need to:
- add the repository
- declare the dependency
- configure shading manually
The plugin will:
- automatically add
com.azuredoom.hytale:hytale-asset-editor-runtime:0.2.0 - make it available on your project's
implementationclasspath - bundle it into your final jar by default
- This removes the need for manual shading or fat-jar configuration.
If you do not want AssetBridge bundled into your jar:
hytaleTools {
bundleAssetEditorRuntime = false
}When disabled:
- the dependency is still available at compile/runtime
- it will not be included inside your final jar
You can override the runtime version if needed:
dependencies {
hytaleBundledRuntime 'com.azuredoom.hytale:hytale-asset-editor-runtime:0.2.0'
}Declaring the dependency manually replaces the plugin’s default.
Use the manual dependency plus shading approach if:
- you are not using
hytale-tools - you need full control over shading behavior
- you are integrating into a custom Gradle setup
Otherwise, using hytale-tools is the simplest and recommended approach.
It is generally safe for multiple mods to bundle AssetBridge in their own jars.
To avoid conflicts:
- ensure each mod has a unique plugin identifier / asset pack ID
- prefer using the same AssetBridge version across mods
- adjust or disable early asset-pack ordering if multiple mods need custom pack positioning
public final class ExamplePluginIntegration extends JavaPlugin {
private AssetEditorPackBridge assetEditorBridge;
@Override
protected void setup() {
assetEditorBridge = AssetEditorRuntime.create(
this,
AssetEditorRuntimeConfig.builder()
.enabled(true)
.enableEarlyAssetPackOrdering(true)
.verboseLogging(false)
.build()
);
assetEditorBridge.registerEarlyAssetPackOrderingHook();
}
@Override
protected void start() {
if (assetEditorBridge != null) {
assetEditorBridge.ensureAssetEditorPackVisible();
}
}
}AssetEditorPackBridge bridge = AssetEditorRuntime.create(this);
bridge.registerEarlyAssetPackOrderingHook();AssetEditorRuntimeConfig config = AssetEditorRuntimeConfig.builder()
.enabled(true)
.enableEarlyAssetPackOrdering(true)
.verboseLogging(false)
.baseAssetPackId("Hytale:Hytale")
.earlyAssetPackOrderPriority((short) -40)
.build();| Option | Description |
|---|---|
enabled |
Enable/disable runtime |
enableEarlyAssetPackOrdering |
Register early load hook |
verboseLogging |
Enable debug logging |
baseAssetPackId |
Reference pack for ordering |
earlyAssetPackOrderPriority |
Hook priority |
AssetBridge hooks into Hytale's asset lifecycle to:
- Register your embedded asset pack
- Replace legacy standalone packs if present
- Ensure correct load order
- Expose the pack to the Asset Editor when built.
All automatically – no manual intervention required.
Inspired by: