ffhcrdgang._07390
📎 1 file 1,270 chars
📄
asssdsasd.txt
txt 60 lines
▶
Title: Auto Shield Breaker (Fabric 1.20+)

Description:
Create a client-side Fabric mod for Minecraft (1.20+). When the player is in PvP and the opponent starts using a shield (is blocking), the mod should automatically switch to an axe in the player’s hotbar and attack to disable/break the shield.

Requirements:

Detect when:

The crosshair is targeting another player.

The targeted player is actively using a shield (blocking).

If blocking is detected:

Automatically search hotbar slots (1–9) for any axe:

Wooden Axe

Stone Axe

Iron Axe

Golden Axe

Diamond Axe

Netherite Axe

Instantly switch to the first available axe.

Perform an attack action.

Conditions:

Only trigger if the player is within attack range.

Respect attack cooldown (don’t spam attacks).

Do not switch if already holding an axe.

Optional: Add a toggle keybind to enable/disable the feature.

Technical:

Use Fabric API.

Use ClientTickEvents for detection.

Use MinecraftClient interaction manager for attacking.

Compatible with multiplayer servers (client-side only logic).

Extra (Optional):

Add delay customization in config.

Add on-screen indicator when feature is active.

Make it work only against players (not mobs).
Kodari AI
KodariFeb 26 at 8:16 am 9,194 (v2)

I’ll create a client-side Fabric mod that automatically breaks shields in PvP combat.

AutoShieldBreaker
A client-side Fabric mod that automatically detects when an opponent is blocking with a shield in PvP combat. When triggered, it intelligently switches to an axe in the hotbar and attacks to disable the shield. Features include attack cooldown respect, smart axe detection, configurable delays, toggle keybinding, and visual indicators. Designed for multiplayer compatibility with client-side only logic.

Created Auto Shield Breaker mod with automatic shield detection, smart axe switching, attack cooldown respect, toggle keybinding (R key), configurable delays and range, and player-only targeting mode.

ffhcrdgang._07390

make it 1.21.11

Kodari AI
KodariFeb 28 at 3:58 am 8,221 (v2)

I’ll update the mod to Minecraft 1.21.11. Let me first check the current configuration files.

Now I’ll update the version to 1.21.11. Note that you may need to verify the exact Fabric API version at https://fabricmc.net/versions/ as I’m using reasonable estimates.

Updated mod to Minecraft 1.21.11. Note that the Fabric API version (0.120.0+1.21.11) is estimated - verify the correct version at https://fabricmc.net/versions/ before building.

Kodari can make mistakes. Review important code before using.
Files
src
.gitignore
build.gradle
gradle.properties
README.md
settings.gradle
Code
10 406
src/main/java/com/autoshieldbreaker/AutoShieldBreakerClient.java
package com.autoshieldbreaker;

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.client.util.InputUtil;
import org.lwjgl.glfw.GLFW;

public class AutoShieldBreakerClient implements ClientModInitializer {
    public static final String MOD_ID = "autoshieldbreaker";
    
    public static KeyBinding toggleKey;
    private ShieldBreakerHandler handler;
    
    @Override
    public void onInitializeClient() {
        ModConfig.load();
        
        toggleKey = KeyBindingHelper.registerKeyBinding(new KeyBinding(
            "key.autoshieldbreaker.toggle",
            InputUtil.Type.KEYSYM,
            GLFW.GLFW_KEY_R,
            "category.autoshieldbreaker"
        ));
        
        handler = new ShieldBreakerHandler();
        
        ClientTickEvents.END_CLIENT_TICK.register(client -> {
            while (toggleKey.wasPressed()) {
                ModConfig.enabled = !ModConfig.enabled;
                ModConfig.save();
                
                if (client.player != null) {
                    client.player.sendMessage(
                        net.minecraft.text.Text.literal(
                            "§6[Shield Breaker] " + 
                            (ModConfig.enabled ? "§aEnabled" : "§cDisabled")
                        ),
                        true
                    );
                }
            }
            
            if (ModConfig.enabled && client.player != null) {
                handler.tick(client);
            }
        });
    }
}