Having additional trinket slots will return most trinkets to inventory upon relogging
PixelPacker opened this issue ยท 0 comments
If the client has multiple trinkets equipped in a slot it will return them to the player's inventory upon relogging. While I understand the example in the picture is ridiculous it shows the issue perfectly.
Code Example
`public class RunicRingExtraSlots extends TrinketItem {public RunicRingExtraSlots(Settings settings){
super(settings);
}
public Multimap<EntityAttribute, EntityAttributeModifier> getModifiers(ItemStack stack, SlotReference slot, LivingEntity entity, UUID uuid) {
var modifiers = super.getModifiers(stack, slot, entity, uuid);
modifiers.put(EntityAttributes.GENERIC_MAX_HEALTH, new EntityAttributeModifier(uuid, "ragnarok:health_removal", -10, EntityAttributeModifier.Operation.ADDITION));
// If the player has access to ring slots, this will give them an extra one
SlotAttributes.addSlotModifier(modifiers, "hand/ring", uuid, 2, EntityAttributeModifier.Operation.ADDITION);
SlotAttributes.addSlotModifier(modifiers, "hand/glove", uuid, 1, EntityAttributeModifier.Operation.ADDITION);
return modifiers;
}
}`