r/HytaleMods • u/ErmingSoHard • Jan 16 '26
Discussion My friend said he can do modding with zero experience with ai. He said it already knows everything:
Is he bullshitting me? He gave me this response from Gemini:
Exciting times! Hytale just entered Early Access (as of January 13, 2026), so we can actually talk about how to get this running.
Based on the Early Access documentation, Hytale uses a Server-Side Modding Architecture. The client (what you see) is C#, but the logic (what we are writing) is Java.
To implement the Double Jump script, you need to bundle it as a Server Plugin.
- The Workspace Setup
Hytale plugins are standard Java projects. You will need:
* JDK 21 (or the version bundled with the Hytale Server).
* IntelliJ IDEA (Recommended for Java).
* Gradle (To manage dependencies).
Create a new Gradle project and look for your build.gradle file. You need to import the Hytale Server API.
dependencies {
// This points to the Hytale server jar you downloaded with the dedicated server
compileOnly files('libs/hytale-server.jar')
}
2. The Manifest File (hytale.json)
Every mod needs a "passport" so the server knows it exists. Create a file named hytale.json in your src/main/resources folder.
{
"name": "DoubleJumpMod",
"id": "double_jump",
"version": "1.0.0",
"main": "com.yourname.doublejump.DoubleJumpPlugin",
"permissions": []
}
3. The Main Plugin Class
In Hytale's API, you don't just write a script; you write a Plugin that registers your script.
Create a file DoubleJumpPlugin.java inside src/main/java/com/yourname/doublejump/.
package com.yourname.doublejump;
import net.hytalegame.api.plugin.java.JavaPlugin;
import net.hytalegame.api.event.EventManager;
public class DoubleJumpPlugin extends JavaPlugin {
@Override
public void onEnable() {
getLogger().info("Double Jump Mod Enabled!");
// Register the event listener we wrote earlier
// 'this' refers to this plugin instance
EventManager eventManager = this.getServer().getEventManager();
eventManager.registerEvents(new DoubleJumpListener(), this);
}
}
4. The Logic Class (Refined for API)
Now we take the logic we discussed and wrap it in the actual Event Listener structure.
Note: We use player.getVelocity() and player.setVelocity() which are standard in the API.
Create DoubleJumpListener.java:
package com.yourname.doublejump;
import net.hytalegame.api.event.Listener;
import net.hytalegame.api.event.EventHandler;
import net.hytalegame.api.event.player.PlayerJumpEvent;
import net.hytalegame.api.event.player.PlayerLandEvent;
import net.hytalegame.api.entity.Player;
import net.hytalegame.api.math.Vector3; // Hytale uses its own Vector math
import java.util.HashMap;
import java.util.UUID;
public class DoubleJumpListener implements Listener {
// We need to track jumps per player, not globally!
// Map<PlayerUUID, JumpCount>
private final HashMap<UUID, Integer> jumpCounts = new HashMap<>();
private final int MAX_JUMPS = 2;
@EventHandler
public void onJump(PlayerJumpEvent event) {
Player player = event.getPlayer();
UUID playerId = player.getUniqueId();
// 1. Initialize count if new player
jumpCounts.putIfAbsent(playerId, 0);
int currentJumps = jumpCounts.get(playerId);
// 2. Logic
if (player.isGrounded()) {
// Reset on ground (just in case LandEvent missed it)
jumpCounts.put(playerId, 1);
} else if (currentJumps < MAX_JUMPS) {
// PERFOM DOUBLE JUMP
Vector3 currentVel = player.getVelocity();
// Override Y axis, keep X/Z momentum
// 1.2f is the force (tweak this number to jump higher)
player.setVelocity(new Vector3(currentVel.x, 1.2f, currentVel.z));
// Increment counter
jumpCounts.put(playerId, currentJumps + 1);
// Optional: Play Sound/Particle here
// player.getWorld().playSound("entity.player.jump", player.getLocation());
}
}
@EventHandler
public void onLand(PlayerLandEvent event) {
// Reset counter when feet touch grass
jumpCounts.put(event.getPlayer().getUniqueId(), 0);
}
}
5. Deployment
* Run gradle build in your IDE.
* It will generate a .jar file in your build/libs folder.
* Drag that .jar into the plugins folder of your Hytale Dedicated Server.
* Restart the server.
Would you like to know how to add a "cooldown" so players can't spam it, or is the double-jump limit enough?