Чокрлад М

Make a mod that instead of firing snowballs fires half the size tnt with a red glowing effect (the explosion is halved too)

Kodari AI
KodariFri at 8:28 pm 6
MiniTntSnowball
A Fabric mod that transforms snowball projectiles into miniature TNT blocks. When thrown, snowballs are replaced with half-sized TNT entities that emit a red glowing effect. Upon impact, they explode with reduced blast radius and damage, creating a fun, less destructive combat alternative. The mod intercepts snowball entity spawning, swaps the visual model, applies the glow, and scales down explosion power for balanced gameplay.
  • Replace thrown snowballs with half-size TNT visuals and a red outline.

  • Explode them on impact at half normal TNT blast radius; ordinary snowballs remain obtainable as usual.

Thrown snowballs now appear as half-size TNT with a red glow and explode on impact at half the normal TNT blast radius.

In survival, collect snowballs from snow as usual.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
8 173
src/client/java/com/kodari/explosivesnowballs/client/ExplosiveSnowballsClient.java
package com.kodari.explosivesnowballs.client;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;
import net.minecraft.world.entity.EntityTypes;

public class ExplosiveSnowballsClient implements ClientModInitializer {
    @Override
    public void onInitializeClient() {
        EntityRendererRegistry.register(EntityTypes.SNOWBALL, ExplosiveSnowballRenderer::new);
    }
}