45 XERATT

Create a complete, working Minecraft Java Edition 26.2 Fabric mod called Jump TNT.

Requirements:

  • Every time the player jumps, spawn one primed TNT entity at the player's position.
  • TNT must be lit and explode using normal vanilla behavior.
  • Singleplayer-focused.
  • Use the correct Minecraft 26.2 mappings, Fabric Loader, Fabric API, Java 25, and compatible Gradle/Loom versions.
  • Include all required source files, fabric.mod.json, and build configuration.
  • Compile the project and fix errors until the build succeeds.
  • Output the actual installable JAR from the build/libs folder.
  • Do not give me only source code or a ZIP and claim it is installable.
  • Verify the JAR was successfully built and explain how to install it in Modrinth App.

pls gimme working jar file to import to modrinth

Kodari AI
KodariOct 19 at 7:28 am 1
JumpTNT
Jump TNT is a Minecraft Fabric mod that spawns a primed TNT entity at the player's position every time they jump. Each jump triggers vanilla TNT explosion behavior, creating explosive gameplay. Singleplayer-focused with no configuration needed. Built for Minecraft 26.2 with Fabric Loader and Fabric API, compiled with Java 25 and compatible Loom build system.
  1. Configure a Java 25 / Fabric 26.2 Loom project.

  2. Register a server-side jump hook that spawns vanilla primed TNT.

  3. Build and provide the installable JAR if this environment exposes the build artifact.

Created Jump TNT for Minecraft 26.2 / Fabric. It detects a player’s grounded-to-airborne jump on the server and spawns vanilla primed TNT at their position, so the TNT uses normal fuse and explosion behavior.

To build and download the installable JAR in Kodari:

  1. Click Compile in the desktop top bar, or on phone tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. When it succeeds, click Download on the build or Download jump-tnt.jar in the chat.

To install it in Modrinth App, use a profile with Minecraft 26.2 and Fabric, open that profile’s folder, place the downloaded JAR in its mods folder, then launch the profile.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
5 115
src/main/java/com/kodari/jumptnt/JumpTntMod.java
package com.kodari.jumptnt;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.item.PrimedTnt;

import java.util.HashSet;
import java.util.Set;
import java.util.UUID;

public final class JumpTntMod implements ModInitializer {
	private final Set<UUID> groundedPlayers = new HashSet<>();

	@Override
	public void onInitialize() {
		ServerTickEvents.END_SERVER_TICK.register(this::onEndServerTick);
	}

	private void onEndServerTick(MinecraftServer server) {
		Set<UUID> onlinePlayers = new HashSet<>();

		for (ServerPlayer player : server.getPlayerList().getPlayers()) {
			UUID playerId = player.getUUID();
			onlinePlayers.add(playerId);

			if (player.onGround()) {
				groundedPlayers.add(playerId);
				continue;
			}

			if (groundedPlayers.remove(playerId)
					&& player.getDeltaMovement().y > 0.0
					&& player.level() instanceof ServerLevel level) {
				level.addFreshEntity(new PrimedTnt(
						level,
						player.getX(),
						player.getY(),
						player.getZ(),
						player
				));
			}
		}

		groundedPlayers.retainAll(onlinePlayers);
	}
}