Use This Sound

Create a client-side Fabric mod for Minecraft 1.21.11 named CleanMaceTrigger. When the player is falling (fallDistance > 1.5f) and the crosshair is pointing at a living entity within 3.5 blocks, search the player's 9-slot hotbar (slots 0-8) for a Mace. If found, store the current selected hotbar slot, switch to the Mace slot, execute a single attack on the target entity, swing the main hand, and immediately restore the previous hotbar slot right after the attack on the same tick. Add a 5-tick cooldown after attacking so it does not spam. Do NOT touch, swap, or modify any armor slots or Elytra. Add a toggle keybind (default key R) that shows an action bar message when toggled ON or OFF (enabled by default)."

Kodari AI
KodariNov 15 at 3:03 pm 2
CleanMaceTrigger
A client-side Fabric mod for Minecraft 1.21.11 that automatically attacks nearby living entities with a Mace while falling. When the player falls (fallDistance > 1.5f) and aims at a living entity within 3.5 blocks, the mod searches the hotbar for a Mace, temporarily switches to it, performs a single attack and hand swing, then restores the previous hotbar slot on the same tick. Includes a 5-tick cooldown to prevent spam, a toggle keybind (default R) with action bar feedback, and leaves armor and Elytra slots untouched. Enabled by default.
  • Register a client-only toggle and tick handler.

  • Switch slots around the attack, synchronizing the restored slot without touching armor.

Created CleanMaceTrigger. Press R to toggle it; it starts enabled and shows its state in the action bar.

It attacks with a hotbar mace while falling, restores the previous slot immediately, and leaves armor untouched. The attack has a five-tick cooldown.

Use This Sound

Can u give me .jar file

Kodari AI
KodariNov 15 at 3:20 pm 1

To get the JAR:

  1. On desktop, click Compile in the top bar. On phone, tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. Once it succeeds, click Download on the build or Download CleanMaceTrigger.jar in the chat.

Use This Sound

I have installed an mod which automatic removes elytra and then put elytra when we attack an entity with mace so this auto attack mod will work or not ?

Kodari AI
KodariNov 15 at 3:27 pm 1

It might work, but compatibility isn’t guaranteed. CleanMaceTrigger switches to the mace, attacks, and switches back in the same tick. Your Elytra mod may need more time or rely on a manual attack to trigger its swap.

Try both together in a safe world first. If the Elytra doesn’t swap reliably, tell me the name of the other mod and I can check how to make them work together.

Use This Sound

The name is AUTO ELYTRA SWAPPER and this is the link

Kodari AI
KodariNov 15 at 3:29 pm 1

The link didn’t come through. Please send it, and I’ll check whether Auto Elytra Swapper works with CleanMaceTrigger.

Use This Sound

https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://modrinth.com/mod/elytra-swapper&ved=2ahUKEwixp_-CpYqYAxV1a2wGHSb8AJQQFnoECBAQAQ&usg=AOvVaw25sIvkI5V_M5gpW0O91nb5

Kodari AI
KodariNov 15 at 3:29 pm 1

The linked Elytra Swapper describes a manual keybind, not automatic swapping when you attack with a mace. Its default swap key is (grave accent).

CleanMaceTrigger may work alongside it, but it won’t press that key for you. You’d need to swap the Elytra manually unless your installed mod has an automatic feature not described on that page.

Use This Sound

Yes it automatically swaps when we attack

Kodari AI
KodariNov 15 at 3:32 pm 1

If your installed version swaps automatically on attack, then it may work with CleanMaceTrigger too. The key question is whether it detects the mod’s attack, and whether it swaps quickly enough before the attack reaches the server.

Please try it in a safe world. If it doesn’t swap reliably, send me the exact version of Auto Elytra Swapper you’re using and I can investigate compatibility.

Use This Sound

If I give you the mods .jar file then can you make a mod which work with that?

Kodari AI
KodariNov 15 at 3:33 pm 1

Yes. Upload the Auto Elytra Swapper JAR, and I can inspect how it detects attacks and adapt CleanMaceTrigger to work with it, if the necessary integration is accessible.

Use This Sound

Bro it's 197 kb and you doesn't support

Kodari AI
KodariNov 15 at 3:34 pm 1

You can send me the mod’s source-code link instead, if it’s public. Otherwise, send its exact version and screenshots or a copy of its settings, and I’ll use those to investigate compatibility.

Use This Sound

?

Elytra Swapper - Minecraft Mod Elytra Swapper Elytra Swapper Swap the Elytra and Chestplate easily with a keybind of your choosing

300K downloads 166 followers Compatibility Minecraft: Java Edition 26.3 26.2 26.1.x 1.21.x 1.20.x Platforms Fabric NeoForge Quilt Supported environments Client-side Links Report issues View source Join Discord server Sponsor on GitHub Tags Game Mechanics Utility Creators SaolGhra SaolGhra Member Details Licensed CC-BY-4.0 Published 2 years ago Updated 2 months ago Description Gallery Changelog Versions Elytra Swapper Elytra Swapper is a Minecraft Fabric mod that allows players to quickly swap between an Elytra and a Chestplate.

Features Elytra and Chestplate Swapping: Seamlessly swap between an Elytra and a Chestplate with a configurable keybinding.

Customizable Keybinding: Set your preferred key for swapping in Minecraft's controls settings.

Enhanced Compatibility: Improved functionality and compatibility with various Minecraft versions.

Installation Install Fabric Loader:

Download and install Fabric Loader from Fabric's official website.

Install Fabric API:

Download the Fabric API from CurseForge or Modrinth.

Add Elytra Swapper:

Download the latest version of Elytra Swapper from the Releases page.

Place the JAR file into the mods folder in your Minecraft directory.

Launch Minecraft:

Start Minecraft using the Fabric profile. The mod should be active.

Configuration Keybinding: By default, the key for swapping between Elytra and Chestplate is the grave accent (`). You can customize this keybinding in Minecraft's controls settings under the "Elytra Swapper" category.

Usage Equip Elytra or Chestplate: Ensure that either an Elytra or a Chestplate is equipped in your inventory.

Press the Keybinding: Press the configured key to swap between the Elytra and Chestplate.

Modrinth is open source.

© 2026 Rinth, Inc.

About News Changelog Status Careers Rewards Program Products Modrinth+ Modrinth App Modrinth Hosting Resources Help Center Translate Report issues API documentation Legal Content Rules Terms of Use Privacy Policy Security Notice Copyright Policy and DMCA NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.

Kodari AI
KodariNov 15 at 3:38 pm 1

You don’t need to upload the JAR—the page links to its public source code.

The description only mentions a keybind, so I can’t yet confirm how your automatic attack swap works. What version of Elytra Swapper do you have installed? It should be in the JAR filename or your mod list.

Use This Sound

1.21.11 and fabric and yes it is in my list

Kodari AI
KodariToday at 3:15 am 1

Thanks! I found a Fabric 1.21.11 release of Elytra Swapper, so you don’t need to upload the JAR.

Could you send the full JAR filename from your mods folder? That will tell me which release you have. Also, does it swap to a chestplate before the mace attack and back to Elytra afterward?

Use This Sound

Can u remove the cooldown and then create the mod

Kodari AI
KodariToday at 4:31 pm 1
  • Remove the five-tick cooldown while keeping the existing attack and slot-restoration behavior.

Removed the cooldown. CleanMaceTrigger can now attempt an attack every tick while the conditions are met. It still restores your hotbar slot and doesn’t touch armor.

To get the updated JAR, click Compile in the top bar, then Compile in the window and Download when it succeeds. On phone, use ⋮ → Compile Project.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
8 166
src/client/java/com/cleanmacetrigger/CleanMaceTrigger.java
package com.cleanmacetrigger;

import com.cleanmacetrigger.mixin.ClientPlayerInteractionManagerInvoker;
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.MinecraftClient;
import net.minecraft.client.option.KeyBinding;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.Items;
import net.minecraft.text.Text;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.EntityHitResult;
import org.lwjgl.glfw.GLFW;

public final class CleanMaceTrigger implements ClientModInitializer {
    private boolean enabled = true;
    private KeyBinding toggle;

    @Override
    public void onInitializeClient() {
        toggle = KeyBindingHelper.registerKeyBinding(new KeyBinding(
                "key.cleanmacetrigger.toggle", GLFW.GLFW_KEY_R, KeyBinding.Category.MISC));
        ClientTickEvents.END_CLIENT_TICK.register(this::tick);
    }

    private void tick(MinecraftClient client) {
        while (toggle.wasPressed()) {
            enabled = !enabled;
            if (client.player != null) {
                client.player.sendMessage(Text.literal("CleanMaceTrigger: " + (enabled ? "ON" : "OFF")), true);
            }
        }

        if (!enabled || client.player == null || client.interactionManager == null
                || client.player.fallDistance <= 1.5f
                || !(client.crosshairTarget instanceof EntityHitResult hit)
                || !(hit.getEntity() instanceof LivingEntity target)
                || !target.isAlive() || client.player.distanceTo(target) > 3.5f) {
            return;
        }

        PlayerInventory inventory = client.player.getInventory();
        for (int slot = 0; slot < 9; slot++) {
            if (!inventory.getStack(slot).isOf(Items.MACE)) {
                continue;
            }
            int previousSlot = inventory.getSelectedSlot();
            inventory.setSelectedSlot(slot);
            try {
                client.interactionManager.attackEntity(client.player, target);
                client.player.swingHand(Hand.MAIN_HAND);
            } finally {
                inventory.setSelectedSlot(previousSlot);
                ((ClientPlayerInteractionManagerInvoker) client.interactionManager).cleanmacetrigger$syncSelectedSlot();
            }
            return;
        }
    }
}