Skip to content
VadamDev edited this page Oct 7, 2022 · 2 revisions
public class ExempleHelmetItem extends CustomArmorPart {
    public ExempleHelmetItem() {
        //Note 1: The armor type is the base material of the armor (DIAMOND, IRON, etc...)
        super(ArmorType.DIAMOND, ArmorPart.HELMET, "Exemple Custom Helmet", "lorem", "%bar%");
    }

    @Override
    public boolean onHolderDamaged(Player player, Entity damager, ItemStack item) {
        //Note: If you're overriding this method, dont forget to keep this super.
        super.onHolderDamaged(player, damager, item);
        return false;
    }

    //The custom armor max durability
    @Override
    public int getMaxDurability() {
        return 1100;
    }

    //An optional method for handling durability bars, see the wiki for more informations.
    @Override
    public IDurabilityBar getDurabilityBar() {
        return new NumberMinecraftDurabilityBar("%bar%");
    }

    @Override
    public String getRegistryName() {
        return "demonite_helmet";
    }
}

Introduction

Using CustomContentLib

Items

Blocks

  • Blocks
    • Block (Soon...)
    • Tile Entity (Soon...)

Recipes

  • Shaped Recipe
  • Shapeless Recipe

Clone this wiki locally