TNT Plugin for Hytale
A comprehensive explosives plugin that adds various types of TNT with unique effects.
Features
- 10 unique TNT types with different explosion behaviors
- /tnt command for instant explosions
- Placeable TNT blocks that explode when broken
- Crafting recipes for all TNT types
- Configurable radius, fuse time, and restrictions
- Optimized batch processing to prevent lag
TNT Types
| Type | Radius | Effect |
|---|---|---|
| Small | 3 | Basic destruction |
| Big | 8 | Large destruction |
| Nuke | 25 | Massive destruction |
| Fire | 6 | Destroys + spreads fire |
| Snow | 8 | Converts to snow/ice |
| Stone | 6 | Fills empty space with stone |
| House | 10 | Builds a small house! |
| Scatter | 5 | Randomizes block positions |
| Tunnel | 15 | Digs a 3x3 tunnel forward |
| Crater | 12 | Creates bowl-shaped crater |
Commands
/tnt <type> [distance] - Create explosion
/tnt list - Show all types
/tnt help - Show help
Examples:
/tnt big - Big explosion at your feet
/tnt nuke 50 - Nuke 50 blocks ahead
/tnt tunnel - Dig tunnel forward
/tnt house - Build a house
Aliases: /explode, /boom, /kaboom
Crafting
All TNT is crafted at the Tinkering Bench.
Basic Tier
- Small TNT (x2): 4 Rock + 2 Fire Essence
Advanced Tier
- Big TNT: 4 Small TNT + 4 Fire Essence + 2 Iron Bar
- Fire TNT: 2 Small TNT + 8 Fire Essence
- Snow TNT: 2 Small TNT + 8 Water Essence
- Stone TNT: 2 Small TNT + 8 Earth Essence + 16 Rock
- Scatter TNT: 2 Small TNT + 8 Air Essence
- Tunnel TNT (x2): 4 Small TNT + 4 Earth Essence + 4 Iron Bar
Expert Tier
- Crater TNT: 2 Big TNT + 10 Earth Essence
- House TNT: 2 Stone TNT + 32 Wood + 4 Glass
Legendary
- Nuke TNT: 8 Big TNT + 20 Fire Essence + 4 Adamantite Bar
Configuration
Config file: TNTConfig.json
{
"RadiusMultiplier": 1.0, // Scale all explosions (0.1-5.0)
"MaxRadius": 50, // Maximum explosion radius
"AllowNuke": true, // Enable/disable nuke
"FuseTime": 40, // Ticks before explosion (40 = 2 sec)
"DestroyPlayerBlocks": true,
"ShowParticles": true,
"CommandCooldown": 5 // Seconds between /tnt uses
}
Usage
Command Usage
- Type
/tnt <type>to create an explosion at your feet - Add a distance:
/tnt big 20to explode 20 blocks ahead - Use
/tnt listto see all available types
Block Usage
- Craft TNT at a Tinkering Bench
- Place the TNT block
- Break the block to activate it
- Run! Fuse time is configurable (default 2 seconds)
Performance
The explosion system is optimized for performance:
- Batch processing: Blocks are modified in batches of 64
- Cached calculations: Sphere coordinates are pre-calculated
- Async execution: Explosions run on separate threads
- Distance-based falloff: Outer blocks have lower destruction chance
Large explosions (nuke) may cause brief lag but won't crash the server.
Installation
- Build with
./gradlew build - Copy
build/libs/TNT-Plugin-1.0.0.zipto%appdata%/Hytale/UserData/Mods/ - Restart the server
Development
Requirements
- Java 25
- IntelliJ IDEA
- Hytale installed
Building
./gradlew build
Running
- Open in IntelliJ IDEA
- Run the
HytaleServerconfiguration - Connect to
127.0.0.1
File Structure
TNT-Plugin/
├── src/main/
│ ├── java/com/explosives/tnt/
│ │ ├── TNTPlugin.java # Main plugin
│ │ ├── command/
│ │ │ └── TNTCommand.java # /tnt command
│ │ ├── config/
│ │ │ └── TNTConfig.java # Configuration
│ │ ├── explosion/
│ │ │ ├── ExplosionType.java
│ │ │ ├── ExplosionBehavior.java
│ │ │ ├── ExplosionExecutor.java
│ │ │ └── ExplosionRegistry.java
│ │ └── system/
│ │ └── TNTActivationSystem.java
│ └── resources/
│ ├── manifest.json
│ ├── Common/ # Textures (placeholder)
│ └── Server/
│ ├── Item/Items/ # TNT block definitions
│ ├── Item/Recipes/ # Crafting recipes
│ └── Languages/ # Translations
├── build.gradle
├── gradle.properties
└── README.md
Credits
Created for Hytale modding learning purposes.
License
MIT License - Feel free to use and modify!


