emilyploszaj / trinkets

A data-driven accessory mod and API for Minecraft using Fabric.
https://www.curseforge.com/minecraft/mc-mods/trinkets
MIT License
165 stars 72 forks source link

[Question] Adding an extra trinket slot from an armor piece #323

Closed MHanak1 closed 2 months ago

MHanak1 commented 2 months ago

i want to have an armor piece that adds an extra back slot. here is my code:

public final class LightCombatArmorItem extends ArmorItem implements GeoItem {

    @Override
    public Multimap<EntityAttribute, EntityAttributeModifier> getAttributeModifiers(ItemStack stack, EquipmentSlot slot) {
        var modifiers = super.getAttributeModifiers(slot);
        if (slot == EquipmentSlot.CHEST && stack.getHolder() != null) {
            SlotAttributes.addSlotModifier(modifiers, "chest/back", ??? , 1, EntityAttributeModifier.Operation.ADDITION);
        }
        return modifiers;
    }

// more unimportant stuff here
}

the problem is i cannot get the uuid argument, because the method i am overriding in ArmorItem does not require it.

MHanak1 commented 2 months ago

I am closing this, since i decided to write my own system for what i need