Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Kuri_pa

Members
  • Posts

    2
  • Joined

  • Last visited

Kuri_pa's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Problem solved successfully, thanks for the help
  2. I tried adding attributes to my items, but I can't understand how to sort the attributes correctly, it seems to be determined by UUID, but I can't understand his logic this is my code snippet final UUID REACH_DISTANCE_MODIFIER = UUID.fromString("df4804ee-6484-4a75-aa0c-fe5713ecd704"); final UUID ATTACK_DAMAGEMULTIPLY_MODIFIER = UUID.fromString("61885ceb-49c2-41ab-8fce-916f17ae055e"); @Override public Multimap<Attribute, AttributeModifier> getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) { Multimap<Attribute,AttributeModifier> modifier = HashMultimap.create(); if ( slot == EquipmentSlotType.MAINHAND){ modifier.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGEMULTIPLY_MODIFIER,"Weapon modifier",0.496, AttributeModifier.Operation.MULTIPLY_BASE)); modifier.put(ForgeMod.REACH_DISTANCE.get(), new AttributeModifier(REACH_DISTANCE_MODIFIER,"Weapon modifier",2, AttributeModifier.Operation.ADDITION)); modifier.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(ATTACK_DAMAGE_MODIFIER,"Weapon modifier", getAttackDamage(), AttributeModifier.Operation.ADDITION)); modifier.put(Attributes.ATTACK_SPEED, new AttributeModifier(ATTACK_SPEED_MODIFIER,"Weapon modifier", -3.2 , AttributeModifier.Operation.ADDITION)); } return modifier; }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.