Ahmed said Selen

make a fabric mod that combines mace and axes attributes so it can disable shields and deal smash attacks at same time make a new item for it and call the item maxe

Kodari AI
KodariNov 5 at 12:08 pm 7
MaxeCombo
A Fabric mod for Minecraft 1.21.1 that introduces a new hybrid weapon called the "Maxe," combining the attributes of maces and axes. The Maxe can disable shields like an axe while also performing powerful smash attacks like a mace, dealing bonus damage to targets below full health. Crafted from a mace and an axe, this versatile weapon offers players a unique combat style that merges the best of both weapon types, with custom attack animations and sound effects.
  • Add the Maxe as a durable weapon with mace smash attacks and axe-style shield disabling.

  • Give it a crafting recipe, creative-tab entry, and its own texture.

Added the Maxe: it performs mace smash attacks and disables shields for five seconds.

Craft it by combining a mace and a diamond axe in a crafting grid. Repair it with breeze rods. The recipe consumes both ingredients, including any enchantments on them.

Ahmed said Selen

change weapon colour to be purple and white based like white blades on a battle axe with transparent neon purple outline and cracks

Kodari AI
KodariNov 5 at 12:09 pm 4

Updated the Maxe with white battle-axe blades, translucent neon-purple outlines, and glowing purple cracks.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
13 158
src/main/java/com/kodari/maxe/MaxeMod.java
package com.kodari.maxe;

import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.WeaponComponent;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.Items;
import net.minecraft.item.MaceItem;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.util.Identifier;
import net.minecraft.util.Rarity;

public class MaxeMod implements ModInitializer {
    @Override
    public void onInitialize() {
        RegistryKey<Item> key = RegistryKey.of(RegistryKeys.ITEM, Identifier.of("maxe", "maxe"));
        Item maxe = Registry.register(Registries.ITEM, key, new MaceItem(new Item.Settings()
                .registryKey(key)
                .rarity(Rarity.EPIC)
                .maxDamage(500)
                .component(DataComponentTypes.TOOL, MaceItem.createToolComponent())
                .repairable(Items.BREEZE_ROD)
                .attributeModifiers(MaceItem.createAttributeModifiers())
                .enchantable(15)
                .component(DataComponentTypes.WEAPON, new WeaponComponent(1, WeaponComponent.AXE_DISABLE_BLOCKING_FOR_SECONDS))));

        RegistryKey<ItemGroup> combat = RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of("minecraft", "combat"));
        ItemGroupEvents.modifyEntriesEvent(combat).register(entries -> entries.addAfter(Items.MACE, maxe));
    }
}