Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Setting repair material for Armor is not compatible between 1.10.2 & 1.11.2 #6

Open
Sinhika opened this issue Feb 22, 2017 · 0 comments

Comments

@Sinhika
Copy link

Sinhika commented Feb 22, 2017

I can't believe you missed this one when you wrote CompatItemArmor.

  • ArmorMaterial in 1.10 sets repair material by assigning to ArmorMaterial.customCraftingMaterial. There is no setRepairItem() method.
  • ArmorMaterial in 1.11 uses ArmorMaterial.setRepairItem(itemstack) to set the repair material. There is no public field 'customCraftingMaterial' to assign to; it has been renamed and made private.

See the problem? I solved it by writing a helper method; feel free to cut & paste it into a new 'Tools' class: https://github.com/Sinhika/SimpleCore/blob/dev1.9/src/main/java/alexndr/api/helpers/game/ArmorMaterialHelper.java

Internal comments separate the 1.10 version from the 1.11 version; ask if it's not clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant