Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix armor level checking #9786

Merged
merged 6 commits into from
Feb 25, 2024
Merged

Fix armor level checking #9786

merged 6 commits into from
Feb 25, 2024

Conversation

Thodor12
Copy link
Contributor

Changes proposed in this pull request:

  • When checking for armor level, the entire armor set + toughness is taken into consideration as opposed to only the armor level of the chestplate.
  • Fixed the MinecoloniesArmorMaterial to updated ArmorMaterials Mojang implementation, so that armor values are applied in the correct order to each armor type.
  • Updated plate armor:
    • Durability raised from 20 to 37
    • Armor levels updated from 4,9,7,4 to 3,8,6,3 (helmet, chestplate, leggings, boots)
    • Toughness reduced from 2 to 0
    • Enchantment level raised from 6 to 9
  • Updated pirates armors:
    • Pirate armor 1 is now identical to iron with durability of diamond
    • Pirate armor 2 is now identical to diamond with durability of iron
  • Fixed other armors in the mod to use the new armor material constructor (santa hat and build goggles)

[X] Yes I tested this before submitting it.
[ ] I also did a multiplayer test.

Review please

/**
* Implementation for the IArmorMaterial interface so we can add custom armor types.
* Implementation for the ArmorMaterial interface, so we can add custom armor types.
*/
public class MineColoniesArmorMaterial implements ArmorMaterial
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just side question: side you edit this class anyway how about making it true record?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to not hide code :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My intention was to leave it the same implementation as the ArmorMaterials enum so it's easy to spot differences.

@Raycoms Raycoms merged commit fb8e5a5 into ldtteam:version/main Feb 25, 2024
1 check passed
@Thodor12 Thodor12 deleted the fix/armor_levels branch February 25, 2024 09:18
Raycoms pushed a commit that referenced this pull request Mar 24, 2024
When checking for armor level, the entire armor set + toughness is taken into consideration as opposed to only the armor level of the chestplate.
Fixed the MinecoloniesArmorMaterial to updated ArmorMaterials Mojang implementation, so that armor values are applied in the correct order to each armor type.
Updated plate armor:
Durability raised from 20 to 37
Armor levels updated from 4,9,7,4 to 3,8,6,3 (helmet, chestplate, leggings, boots)
Toughness reduced from 2 to 0
Enchantment level raised from 6 to 9
Updated pirates armors:
Pirate armor 1 is now identical to iron with durability of diamond
Pirate armor 2 is now identical to diamond with durability of iron
Fixed other armors in the mod to use the new armor material constructor (santa hat and build goggles)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants