ronnie west

can you make a mod to automate it for single-player? stun webbing is a Minecraft combat technique that, when you switch to the axe in your hotbar, disarms the shield, the again to stun them, then places a web at there feet before they land, and maybe have a HUD and configuration/settings for 1.21.11 - 26.3 Fabric.

Kodari AI
KodariOct 3 at 5:39 pm 2
WebStunComboAssist
Automates the stun webbing combat technique in single-player Minecraft 1.21.11 Fabric. When the player switches to an axe, the mod automatically disarms shields, stuns opponents, and places cobwebs at their feet before landing. Features a configurable HUD displaying combo status and settings for timing, web placement, and toggleable automation.
  1. Build the single-player-only axe/second-hit/cobweb sequence, enabled by a keybind.

  2. Add a compact status HUD and configurable timing/target behavior. I’ll target 1.21.11; 26.3 needs a separate version-specific build because this project’s mapped source is 1.21.11.

Created the Fabric 1.21.11 mod. Press V while aiming at a living entity to switch to an axe, attack, follow up after the configured delay, then place a cobweb at its landing spot when it starts falling. You need an axe and cobweb in your hotbar. The sequence is restricted to single-player; Minecraft has no native “stun” effect, so the follow-up is another axe hit.

Press O to open settings for the follow-up delay and HUD toggle. YACL is included via manifest.kod.

This build targets 1.21.11 only; 26.3 requires a separate version-specific port.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
10 367
src/client/java/com/kodari/stunweb/StunWebClient.java
package com.kodari.stunweb;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.util.Identifier;

public final class StunWebClient implements ClientModInitializer {
    private static final String MOD_ID = "stunweb";
    static final StunWebController CONTROLLER = new StunWebController();

    @Override
    public void onInitializeClient() {
        StunWebConfig.load();

        KeyBinding.Category category = KeyBinding.Category.create(Identifier.of(MOD_ID, "main"));
        KeyBinding activationKey = KeyBindingHelper.registerKeyBinding(
                new KeyBinding("key.stunweb.activate", 86, category)
        );
        KeyBinding settingsKey = KeyBindingHelper.registerKeyBinding(
                new KeyBinding("key.stunweb.settings", 79, category)
        );

        StunWebHud.register();

        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (activationKey.wasPressed()) {
                CONTROLLER.activate(client);
            }
            while (settingsKey.wasPressed()) {
                client.setScreen(StunWebConfig.createScreen(client.currentScreen));
            }
            CONTROLLER.tick(client);
        });
    }
}