Posted December 18, 2024Dec 18 I want to be able to change things like Attack damage and attack speed as a way to upgrade these weapons. However I am pretty stuck on how to do that. My latest attempt has been with ItemAttributes and this not good helper class. public void replaceModifiers(EquipmentSlotGroup pSlot, Holder<Attribute> attributeType, AttributeModifier attributeModifier, double amount) { AttributeModifier modifier = new AttributeModifier(attributeModifier.id(), attributeModifier.amount() + amount, attributeModifier.operation()); ItemAttributeModifiers.builder() .add(attributeType, modifier, pSlot) .build(); }
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.