File Details
HYTALEDEVLIB-0.4.0.jar
- R
- Jan 20, 2026
- 151.44 KB
- 409
- Early Access
File Name
HYTALEDEVLIB-0.4.0.jar
Supported Versions
- Early Access
Version 0.4.0
New Features
ParticleHelper - Particle Effect System
- NEW: Simplified particle spawning system with access to 535+ particle effects
spawnParticle(world, particleId, position)- Spawn particle at positionspawnParticle(world, particleId, position, scale)- Spawn with custom scalespawnParticleAtBlock(world, particleId, blockPos)- Spawn at block positionspawnParticleAtEntity(world, particleId, entity)- Spawn at entity positionspawnParticleAtEntityFeet(world, particleId, entity)- Spawn at entity's feetspawnParticleForPlayer(world, particleId, position, player)- Visible to specific player only
SoundHelper - Sound Effect System
- NEW: Simplified sound playback system with 2D and 3D audio support
- 2D Sounds (UI/Global):
playSound2D(world, soundId)- Play UI sound to all playersplaySound2D(world, soundId, volume, pitch)- With custom volume/pitchplaySound2DToPlayer(world, soundId, player)- Play to specific player
- 3D Sounds (Positional):
playSound3D(world, soundId, position)- Play at world positionplaySound3D(world, soundId, position, volume, pitch)- With custom volume/pitchplaySound3DAtBlock(world, soundId, blockPos)- Play at block positionplaySound3DAtEntity(world, soundId, entity)- Play at entity positionplaySound3DToPlayer(world, soundId, position, player)- Play to specific player only
- Sound categories - SFX, MUSIC, AMBIENT, VOICE, MASTER
- Volume and pitch control - Customize playback (1.0 = normal)
- Automatic distance attenuation - 3D sounds fade with distance
ContainerHelper - Transaction Cancellation
- NEW: Cancel container transactions to prevent item changes
ContainerTransaction.setCancelled(true)- Cancel the transactionContainerTransaction.isCancelled()- Check if transaction was cancelled- Automatic reversion - Cancelled transactions restore BOTH container and player inventory to previous state
- Preserves item data - Returns items to exact original slots with all metadata
EcsEventHelper - Block Health Write Access (Mining Speed Multipliers)
- ENHANCED:
onBlockDamage(world, callback)overload withBlockDamageContextfor read/write access to block health - BlockDamageContext class - Comprehensive context object with block health manipulation
- Read methods:
getBlockHealth()- Current block health (0.0 to 1.0)getPosition()- Block positiongetBlockTypeId()- Block type IDgetGatherType()- Block gather type (e.g., "Rocks", "Woods", "Soils", "SoftBlocks")getPlayerEntity()- Player entitygetCurrentDamage(),getDamage(),getItemInHand(),getWorld()
- Write methods:
setBlockHealth(float)- Set health directly (0.0 = destroyed, 1.0 = full)applyDamage(float)- Apply additional damagerepairBlock(float)- Repair the blocksetMiningSpeedMultiplier(float)- Multiply mining speed (2.0 = 2x faster)
- Read methods:
- Gather type filtering - Filter blocks by category instead of specific IDs
- Works with ALL blocks of the same type (e.g., all rocks, all woods)
- Matches Hytale's tool system (pickaxe for rocks, axe for woods, etc.)
- Available types: "Rocks", "Woods", "Soils", "SoftBlocks", "Benches", "VolcanicRocks"
PlayerHelper - Game Mode Switching
- NEW:
setGameMode(world, entity, gameMode)- Change a player's game mode programmatically - Proper integration - Uses Hytale's internal
Player.setGameMode()method - Event-driven - Fires
ChangeGameModeEvent(can be cancelled by other plugins) - Complete sync - Updates movement manager, sends packets to client, runs switch handlers
- Available modes:
GameMode.valueOf("Creative")- Creative mode (fly, no damage, instant break)GameMode.valueOf("Adventure")- Adventure mode (normal gameplay)
EcsEventHelper - Game Mode Change Event
- NEW:
onGameModeChange(world, callback)- Track when players change game modes - Cancellable event - Can prevent game mode changes
- Callback parameters: Player entity and new GameMode
EcsEventHelper - Player Entity Access for Block Interaction and Zone Discovery
- ENHANCED: Added player entity parameter to block interaction and zone discovery callbacks
onBlockInteract(world, callback)- Now has overload withEntity playerEntityparameteronZoneDiscovery(world, callback)- Now has overload withEntity playerEntityparameter- Benefits:
- Identify which player interacted with blocks
- Identify which player discovered zones
- Access player stats directly in event callbacks
- Send targeted messages to specific players
- Check player permissions for interactions
- Track player-specific statistics
- Backward compatible - Original callbacks without player entity still work
PlayerHelper - Block Targeting System
- NEW: Get the block a player is looking at with distance information
getLookingAt(world, entity, checkDistance)- Get target block within specified distancegetLookingAt(world, entity)- Get target block with default 5 block distance- LookingAtResult class - Comprehensive result object with helper methods
getBlockPosition()- ReturnsVector3iposition of the blockgetBlockType()- ReturnsBlockTypeobjectgetBlockId()- Returns block ID string (e.g., "Rock_Stone")getDistance()- Returns distance to the blockhasBlock()- Returns true if a block was found

