Trinkets (Fabric)

Trinkets (Fabric)

22M Downloads

Duplicated Trinket Tooltip

Raft08 opened this issue ยท 1 comments

commented

Hello,
My item tooltip is duplicated
image
I use the last version of Trinkets (3.3.0) and last version of Fabric (0.13.3) on Minecraft 1.18.2

commented

And here is my item code:

public class HealthRing extends TrinketItem {
    private int healthUpgrade;
    public HealthRing(Settings settings, int health) {
        super(settings);
        this.healthUpgrade = health;
    }

    public Multimap<EntityAttribute, EntityAttributeModifier> getModifiers(ItemStack stack, SlotReference slot, LivingEntity entity, UUID uuid) {
        var modifiers = super.getModifiers(stack, slot, entity, uuid);
        //Add max health
        modifiers.put(EntityAttributes.GENERIC_MAX_HEALTH, new EntityAttributeModifier(uuid,
                "tgc:health", healthUpgrade, EntityAttributeModifier.Operation.ADDITION));
        return modifiers;
    }
}