Skip to content

Asset System Overview

The Asset System manages all game content including blocks, items, entities, sounds, particles, and more. Assets are defined in JSON files and can be bundled with plugins.

com.hypixel.hytale.server.core.asset.type

Asset packs follow a specific directory structure:

  • Directorymy-plugin.jar/
    • manifest.json
    • Directoryassets/
      • Directoryblocktype/ Block definitions
      • Directoryitem/ Item definitions
      • Directorymodel/ 3D models
      • Directorysoundevent/ Sound events
      • Directorysoundset/ Sound collections
      • Directoryparticle/ Particle systems
      • Directoryweather/ Weather configurations
      • Directoryentity/ Entity definitions
      • Directoryentityeffect/ Status effects
      • Directoryenvironment/ Environment settings
      • Directoryambiencefx/ Ambient effects
      • Directorygameplay/ Gameplay configurations

Define block behavior and properties:

{
"Id": "MyPlugin_CustomBlock",
"Group": "MyBlocks",
"DrawType": "Cube",
"Material": "Solid",
"Opacity": "Solid",
"Textures": [
{
"Up": "textures/block_top.png",
"Down": "textures/block_bottom.png",
"North": "textures/block_side.png",
"South": "textures/block_side.png",
"East": "textures/block_side.png",
"West": "textures/block_side.png"
}
],
"HitboxType": "Full",
"BlockSoundSetId": "Hytale/Stone",
"Light": {
"Color": "#FFAA00",
"Intensity": 10
}
}

Key properties:

PropertyTypeDescription
IdstringUnique block identifier
GroupstringGrouping for organization
DrawTypeenumRendering type (Empty, Cube, Model, CubeWithModel, GizmoCube)
MaterialenumPhysical material (Empty or Solid)
OpacityenumLight blocking (Solid, Transparent, SemiTransparent)
TexturesarrayPer-face texture definitions
HitboxTypestringCollision hitbox type
BlockSoundSetIdstringSound set reference
LightobjectEmitted light with Color and Intensity

Define items and their behavior:

{
"Id": "MyPlugin_CustomSword",
"DisplayName": "Custom Sword",
"Model": "MyPlugin/sword_model",
"MaxStack": 1,
"MaxDurability": 500,
"AttackDamage": 7.0,
"AttackSpeed": 1.6,
"Tags": ["weapon", "sword"]
}

Key properties:

PropertyTypeDescription
IdstringUnique item identifier
DisplayNamestringLocalized display name
MaxStackintMaximum stack size
MaxDurabilityfloatMaximum durability (0 = unbreakable)
AttackDamagefloatMelee damage
Tagsstring[]Item categorization tags

Sound events use a layered system where each layer contains a list of audio files (one chosen at random), with per-layer volume, looping, and randomization settings.

{
"Layers": [
{
"Files": [
"Sounds/Items/Chest/Chest_Open.ogg"
]
}
],
"Volume": 2.0,
"Parent": "SFX_Attn_Quiet"
}

Top-level properties:

PropertyTypeDescription
VolumefloatVolume adjustment in decibels (-100 to 10)
PitchfloatPitch adjustment in semitones (-12 to 12)
LayersSoundEventLayer[]Layered sounds that make up this event
AudioCategorystringAudio category for volume routing
MaxInstanceintMax concurrent instances (1-100, default 50)
PreventSoundInterruptionboolPrevent overlap interruption
StartAttenuationDistancefloatDistance (blocks) to begin attenuation
MaxDistancefloatMax audible distance in blocks

Layer properties:

PropertyTypeDescription
Filesstring[]Audio file paths (one chosen at random)
VolumefloatLayer volume offset in dB
LoopingboolWhether this layer loops
ProbabilityintChance of playing (percentage)
RandomSettingsobjectRandomization (MinVolume, MaxVolume, MinPitch, MaxPitch, MaxStartOffset)

Particle systems combine multiple spawner references into a single effect. The particle/ directory contains .particlesystem files, while individual emitter configurations live in .particlespawner files.

{
"Id": "MyPlugin_CustomParticle",
"Spawners": [
{
"SpawnerId": "MyPlugin:MySpawner"
}
],
"LifeSpan": 2.0,
"CullDistance": 64.0,
"BoundingRadius": 5.0,
"IsImportant": false
}

Key properties:

PropertyTypeDescription
IdstringUnique particle system identifier
SpawnersParticleSpawnerGroup[]Array of spawner group references
LifeSpanfloatDuration of the particle system in seconds
CullDistancefloatDistance at which the system stops rendering
BoundingRadiusfloatBounding sphere radius for culling
IsImportantboolWhether this system should always render regardless of particle settings

See Particles for the full spawner and system reference.

Entity effects are status effects that modify stats, deal damage over time, change visuals, and more. They use a stat modifier system rather than simple key-value effects.

{
"Id": "MyPlugin_CustomEffect",
"Name": "effect.custom",
"Duration": 10.0,
"Debuff": true,
"StatModifiers": {
"MovementSpeed": -0.3
},
"ApplicationEffects": {
"EntityBottomTint": "#00FF00",
"HorizontalSpeedMultiplier": 0.7,
"WorldSoundEventId": "SFX_Effect_Poison"
},
"StatusEffectIcon": "ui/icons/custom_effect"
}

Key properties:

PropertyTypeDescription
NamestringLocalization key for display name
DurationfloatDefault duration in seconds
InfiniteboolWhether the effect lasts forever
DebuffboolWhether this is a negative effect
StatModifiersmap<string, float>Stat modifications to apply
ValueTypeenumAbsolute or Percent for stat modifiers
ApplicationEffectsobjectVisual/audio effects on application (tints, particles, sounds)
DamageCalculatorobjectDamage-over-time configuration
StatusEffectIconstringIcon shown in the UI
OverlapBehaviorenumIGNORE, EXTEND, or OVERWRITE
InvulnerableboolMakes entity invulnerable while active

Weather assets control visual sky, fog, and lighting properties using time-based keyframes. Each property is an array of { Hour, Color/Value } entries that interpolate across the 24-hour day cycle.

{
"Id": "MyPlugin_ClearWeather",
"Stars": "textures/sky/stars_default",
"FogDistance": [-96.0, 1024.0],
"SunlightColors": [
{ "Hour": 6.0, "Color": "#FFCC88" },
{ "Hour": 12.0, "Color": "#FFFFFF" }
],
"SkyTopColors": [
{ "Hour": 0.0, "Color": "#112244FF" },
{ "Hour": 12.0, "Color": "#4488CCFF" }
],
"FogColors": [
{ "Hour": 0.0, "Color": "#1A1A2E" },
{ "Hour": 12.0, "Color": "#C0C8D0" }
],
"Clouds": [
{
"Texture": "textures/sky/clouds_default",
"Colors": [
{ "Hour": 0.0, "Color": "#333344AA" },
{ "Hour": 12.0, "Color": "#FFFFFFCC" }
],
"Speeds": [
{ "Hour": 0.0, "Value": 0.5 }
]
}
],
"Particle": {
"SystemId": "Hytale:RainParticle",
"Color": "#AABBCC",
"Scale": 1.0,
"OvergroundOnly": true
}
}

Weather uses three keyframe types:

  • TimeColor: { "Hour": 0.0-24.0, "Color": "#RRGGBB" }
  • TimeColorAlpha: { "Hour": 0.0-24.0, "Color": "#RRGGBBAA" }
  • TimeFloat: { "Hour": 0.0-24.0, "Value": float }

See Weather for the full property reference.

GameplayConfig is a composite asset containing sub-configurations for many gameplay systems:

{
"Id": "MyPlugin_GameplayConfig",
"Gathering": { },
"World": { },
"Death": { },
"Respawn": { },
"Combat": { },
"Player": { },
"ItemDurability": { },
"ItemEntity": { },
"Crafting": { },
"Spawn": { },
"Plugin": { },
"CameraEffects": { },
"ShowItemPickupNotifications": true,
"MaxEnvironmentalNPCSpawns": 500
}

Sub-configurations:

KeyConfig ClassDescription
GatheringGatheringConfigBlock gathering/mining settings
WorldWorldConfigWorld behavior settings
DeathDeathConfigDeath behavior and drops
RespawnRespawnConfigRespawn mechanics
CombatCombatConfigCombat mechanics
PlayerPlayerConfigPlayer settings
ItemDurabilityItemDurabilityConfigDurability rules
ItemEntityItemEntityConfigDropped item entity settings
CraftingCraftingConfigCrafting system settings
SpawnSpawnConfigSpawn mechanics
PluginmapPlugin-specific config (extensible)
CameraEffectsCameraEffectsConfigCamera effect settings
// Block types
BlockType blockType = BlockType.getAssetMap().get("MyPlugin_CustomBlock");
// Items
Item item = Item.getAssetMap().get("MyPlugin_CustomSword");
// Weather
Weather weather = Weather.getAssetMap().get("MyPlugin_CustomWeather");
// Entity effects
EntityEffect effect = EntityEffect.getAssetMap().get("MyPlugin_CustomEffect");

Each asset type has an AssetMap for lookups:

AssetMap<BlockType> blockTypes = BlockType.getAssetMap();
// Get by key
BlockType block = blockTypes.get("Block_Key");
// Get all keys
Set<String> keys = blockTypes.keySet();
// Check existence
boolean exists = blockTypes.containsKey("Some_Block");
// Get index (for network serialization)
int index = blockTypes.getIndex("Block_Key");

Set IncludesAssetPack in manifest.json:

{
"Name": "MyPlugin",
"IncludesAssetPack": true
}
@Override
protected void setup() {
// Register custom asset type handler
getAssetRegistry().register(/* asset registration */);
}

Modify existing assets at runtime:

// Get block type
BlockType stone = BlockType.getAssetMap().get("Block_Stone");
// Assets are typically immutable
// Use asset overrides in your asset pack instead

When multiple packs define the same asset, priority determines which is used:

  1. Core Assets: Base game assets (lowest priority)
  2. Plugin Assets: In order of plugin loading
  3. Override Packs: Explicit overrides (highest priority)

Assets are validated on load:

// Assets use validators
BuilderCodec<Item> codec = Item.CODEC;
// Validation includes:
// - Required fields
// - Value ranges
// - Reference validity
// - Type constraints

Assets use the Codec system for serialization:

// Most assets have a CODEC
BuilderCodec<BlockType> blockCodec = BlockType.CODEC;
BuilderCodec<Item> itemCodec = Item.CODEC;
// Serialize to BSON
BsonDocument doc = codec.encode(asset, extraInfo);
// Deserialize
Asset loaded = codec.decode(doc, extraInfo);

The server supports hot-reloading of assets during development:

  • Assets in development packs can be reloaded
  • Connected clients receive updated asset data
  • Not all asset changes take effect immediately

All 35 asset types organized by category:

DirectoryClassDescription
blocktype/BlockTypeBlock definitions
blockset/BlockSetBlock groupings
item/ItemItem definitions
fluid/FluidFluid types
projectile/ProjectileProjectile definitions
DirectoryClassDescription
model/Model3D models
particle/ParticleParticle systems
trail/TrailTrail effects
modelvfx/ModelVFXModel visual effects
fluidfx/FluidFXFluid visual effects
blockbreakingdecal/BlockBreakingDecalBreak animation overlays
blockhitbox/BlockBoundingBoxesBlock collision shapes
blockparticle/BlockParticleSetBlock particle effects
DirectoryClassDescription
soundevent/SoundEventIndividual sounds
soundset/SoundSetSound collections
blocksound/BlockSoundSetBlock-specific sounds
itemsound/ItemSoundSetItem-specific sounds
audiocategory/AudioCategoryAudio categories
equalizereffect/EqualizerEffectAudio equalizer effects
reverbeffect/ReverbEffectAudio reverb effects
DirectoryClassDescription
weather/WeatherWeather systems
environment/EnvironmentEnvironment settings
ambiencefx/AmbienceFXAmbient effects
portalworld/PortalWorldPortal world definitions
DirectoryClassDescription
gameplay/GameplayConfigGameplay configuration
gamemode/GameModeGame mode definitions
entityeffect/EntityEffectStatus effects
attitude/AttitudeNPC attitudes
camera/CameraCamera configurations
itemanimation/ItemAnimationItem animations
blocktick/TickProcedureBlock tick procedures
DirectoryClassDescription
buildertool/BuilderToolBuilder tools
tagpattern/TagPatternTag matching patterns
responsecurve/ResponseCurveMathematical curves
wordlist/WordListWord lists for generation
  1. Use unique prefixes: Prefix asset IDs with your plugin name
  2. Validate references: Ensure referenced assets exist
  3. Provide defaults: Include sensible default values
  4. Document assets: Comment complex configurations
  5. Test combinations: Verify assets work together
  6. Consider performance: Avoid overly complex particle systems