stunnable

Quick rating

stunnable

No reviews yet

a mod that shows a box/outline around your enemy so you know when to start trying to stun slam

Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Required
Server Unsupported

About

Project Details

Type
Mod
License
Creative Commons Attribution Non Commercial 4.0 International
Latest Version
1.0

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

🟢 Stunnable Mod

A minimal, high-performance client-side Fabric mod that adds highly customizable, reactive visual rendering boxes and outlines around target players within reach range.

Perfect for maintaining spatial awareness and monitoring stun / interaction ranges with fluid animations, rainbow effects, and breathing transitions. 🌟


📋 Table of Contents


⚡ Quick Start

  1. Ensure you have:

    • Fabric Loader
    • Fabric API
    • Cloth Config
    • AutoConfig
  • Drop the stunnable.jar file into your:

.minecraft/mods
  1. Launch the game.

  2. Open the configuration screen directly through ModMenu. 🛠️

Customize:

  • Colors 🎨
  • Rainbow rendering 🌈
  • Breathing opacity transitions 🫁
  • Outline width 📏
  • Fill opacity 🔥

Perfectly tune the HUD style to your preference.


🧠 How It Works — Core Architecture

The mod operates entirely client-side, hooking directly into Minecraft's rendering lifecycle to draw smooth overlays around nearby targets. 🖥️


🔄 Core Initialization

The mod uses standard Fabric entry points for initialization and configuration setup.

StunnableClient

Implements:

ClientModInitializer

Responsible for:

  • Client-side initialization
  • Secondary configuration handling

Stunnable

Implements:

ClientModInitializer

Responsible for:

  • Registering AutoConfig schemas
  • Hooking into Fabric render lifecycle events

🎨 Rendering Lifecycle Hook

Inside Stunnable.java, the mod subscribes to:

WorldRenderEvents.END_MAIN.register(context -> {
    ...
});

This ensures:

  • Rendering updates every frame
  • No game tick delay
  • No block update dependency
  • Extremely smooth visual tracking

📐 Positioning & Calculation Pipeline

🎯 Reach Restrictions

The mod dynamically extracts player interaction range using entity attributes:

double reach = mc.player.getAttributeValue(Attributes.ENTITY_INTERACTION_RANGE);

📦 Relative Delta Rendering

Bounding boxes are translated into camera-relative local coordinates to eliminate render jitter:

AABB box = player.getBoundingBox().move(-camPos.x, -camPos.y, -camPos.z);

🚫 Target Exclusions

The renderer loops through loaded players while excluding the local player:

if (player != mc.player && playerPos.distanceTo(player.position()) <= reach)

⚙️ Configuration Options

The mod includes a complete configurable rendering system accessible through:

  • ModMenu
  • Cloth Config UI
  • AutoConfig config files

🖼️ Render Category

Controls:

  • Box visuals
  • Outline width
  • Opacity
  • Base colors
Option Type Default Purpose
fillColor Color Picker (Hex) 0x00FF00 Inside box face color
outlineColor Color Picker (Hex) 0x00FF00 Bounding edge color
onlyOutline Boolean false Disables fill rendering
fillOpacity Bounded Discrete (0-100) 50 Fill transparency
outlineWidth Bounded Discrete (1-5) 2 Line thickness

🌈 Effects Category

Handles:

  • Dynamic colors
  • Animated transparency
  • Procedural visual effects
Option Type Default Purpose
rainbowMode Boolean false Enables HSV rainbow cycling
rainbowSpeed Bounded Discrete (1-20) 5 Hue transition speed
rainbowFillOnly Boolean true Rainbow affects fill only
breathingEnabled Boolean false Enables opacity breathing
breathingSpeed Bounded Discrete (1-20) 5 Breathing cycle speed
breathingStrength Bounded Discrete (0-100) 50 Breathing intensity

✨ Visual Effects System


🌈 Color Mathematics (HSV → RGB)

When rainbow mode is enabled, colors are generated dynamically using time-synchronized HSV calculations.

This creates:

  • Smooth gradients
  • No stuttering
  • Continuous spectrum transitions
private int hsvToRgb(float hue, float saturation, float value) {
    int h = (int) (hue * 6);
    float f = hue * 6 - h;
    float p = value * (1 - saturation);
    float q = value * (1 - f * saturation);
    float t = value * (1 - (1 - f) * saturation);

    float r, g, b;

    switch (h % 6) {
        case 0 -> {
            r = value;
            g = t;
            b = p;
        }
        case 1 -> {
            r = q;
            g = value;
            b = p;
        }
        case 2 -> {
            r = p;
            g = value;
            b = t;
        }
        case 3 -> {
            r = p;
            g = q;
            b = value;
        }
        case 4 -> {
            r = t;
            g = p;
            b = value;
        }
        case 5 -> {
            r = value;
            g = p;
            b = q;
        }
        default -> {
            r = 0;
            g = 0;
            b = 0;
        }
    }

    return ((int) (r * 255) << 16)
        | ((int) (g * 255) << 8)
        | (int) (b * 255);
}

🫁 Breathing Mathematics

The breathing system modifies opacity using a smooth trigonometric sine wave cycle:

float cycle = (float) (
    Math.sin(time * config.breathingSpeed * 0.003)
    * 0.5 + 0.5
);

float strength = config.breathingStrength / 100f;

breathMod = 1f - (
    1f - (0.3f + 0.7f * cycle)
) * strength;

This produces:

  • Smooth pulsing transitions
  • Non-linear fade behavior
  • Adjustable animation intensity

📐 Low-Level Vertex Buffers

Rendering is handled natively through Minecraft's internal vertex pipelines using VertexConsumer.


🟩 Filled Boxes

Uses:

RenderTypes.debugFilledBox()

Constructs all six faces manually:

  • Bottom
  • Top
  • North
  • South
  • East
  • West

Example:

buffer.addVertex(pose, minX, minY, minZ)
    .setColor(r, g, b, a);

buffer.addVertex(pose, maxX, minY, minZ)
    .setColor(r, g, b, a);

buffer.addVertex(pose, maxX, minY, maxZ)
    .setColor(r, g, b, a);

buffer.addVertex(pose, minX, minY, maxZ)
    .setColor(r, g, b, a);

📏 Outline Boxes

Uses:

RenderTypes.LINES

Maps explicit line segments across bounding coordinates with normals and width parameters.

private void vertex(
    Matrix4f pose,
    VertexConsumer buffer,
    float x,
    float y,
    float z,
    float r,
    float g,
    float b,
    float a,
    float nx,
    float ny,
    float nz,
    float w
) {
    buffer.addVertex(pose, x, y, z)
        .setColor(r, g, b, a)
        .setNormal(nx, ny, nz)
        .setLineWidth(w);
}

🔌 Integration & ModMenu

The mod integrates directly with ModMenu for instant GUI configuration access.


📄 ModMenuIntegration.java

package frqme.isa.dev.stunnable.config;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;

public class ModMenuIntegration implements ModMenuApi {

    @Override
    @SuppressWarnings("removal")
    public ConfigScreenFactory<?> getModConfigScreenFactory() {
        return parent ->
            AutoConfig
                .getConfigScreen(ModConfig.class, parent)
                .get();
    }
}

This automatically bridges:

  • Cloth Config
  • AutoConfig
  • ModMenu

Without requiring:

  • Commands
  • Manual GUI handling
  • Custom screen registration

🛠️

Screenshots

Gallery

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works