Advertisement
Guest User

Untitled

a guest
Mar 6th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. @Override
  2. public Multimap<String, AttributeModifier> getAttributeModifiers(ItemStack stack){
  3. double damageModifier = 0;
  4. if (getCorrectness(stack) > 0.95){
  5. damageModifier = 1.0;
  6. }
  7. else if (getCorrectness(stack) > 0.9){
  8. damageModifier = 0.95;
  9. }
  10. else if (getCorrectness(stack) > 0.85){
  11. damageModifier = 0.9;
  12. }
  13. else if (getCorrectness(stack) > 0.8){
  14. damageModifier = 0.85;
  15. }
  16. else if (getCorrectness(stack) > 0.75){
  17. damageModifier = 0.8;
  18. }
  19. else if (getCorrectness(stack) > 0.7){
  20. damageModifier = 0.75;
  21. }
  22. Multimap modifiers = HashMultimap.create();
  23. modifiers.put("generic.attackDamage", new AttributeModifier("generic.attackDamage", 9.0*(damageModifier), 0));
  24. return modifiers;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement