Skip to content

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

@Sinhika

Description

@Sinhika

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions