Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ProfessorFichte/Bards/llms.txt

Use this file to discover all available pages before exploring further.

The Armors class manages all armor set registration for the Bards RPG mod. It provides methods to create custom armor materials and armor set entries with spell power bonuses and movement speed enhancements.

Overview

The Armors class defines specialized bard armor sets that provide:
  • Spell power bonuses for Arcane and Healing schools
  • Movement speed multipliers
  • Low armor protection optimized for mobility
  • Tier-based progression system

Methods

register()

Registers all armor entries with the Minecraft registry system.
configs
Map<String, ArmorSetConfig>
Configuration map containing armor set statistics and properties
public static void register(Map<String, ArmorSetConfig> configs)

Example usage

import com.bards.item.Armors;
import net.spell_engine.api.config.ArmorSetConfig;

import java.util.HashMap;
import java.util.Map;

public class ModInitializer {
    public void onInitialize() {
        Map<String, ArmorSetConfig> configs = new HashMap<>();
        Armors.register(configs);
    }
}

create()

Creates a new armor set entry with specified properties.
material
RegistryEntry<ArmorMaterial>
required
The armor material registry entry
id
Identifier
required
The unique identifier for this armor set
durability
int
required
Base durability multiplier for the armor pieces
tier
int
required
Loot tier level (determines loot table generation)
factory
Armor.Set.ItemFactory
required
Factory function to create armor item instances
defaults
ArmorSetConfig
required
Default configuration with armor values and attributes
settings
Armor.ItemSettingsTweaker
required
Item settings tweaker for additional properties
entry
Armor.Entry
Returns a configured armor set entry
private static Armor.Entry create(
    RegistryEntry<ArmorMaterial> material,
    Identifier id,
    int durability,
    int tier,
    Armor.Set.ItemFactory factory,
    ArmorSetConfig defaults,
    Armor.ItemSettingsTweaker settings
)

material()

Creates and registers a custom armor material.
name
String
required
The registry name of the armor material
protectionHead
int
required
Armor points for helmet
protectionChest
int
required
Armor points for chestplate
protectionLegs
int
required
Armor points for leggings
protectionFeet
int
required
Armor points for boots
enchantability
int
required
How easily the armor can be enchanted
equipSound
RegistryEntry<SoundEvent>
required
Sound played when equipping the armor
repairIngredient
Supplier<Ingredient>
required
Ingredient used to repair the armor
material
RegistryEntry<ArmorMaterial>
Returns a registered armor material entry
public static RegistryEntry<ArmorMaterial> material(
    String name,
    int protectionHead,
    int protectionChest,
    int protectionLegs,
    int protectionFeet,
    int enchantability,
    RegistryEntry<SoundEvent> equipSound,
    Supplier<Ingredient> repairIngredient
)

Example material creation

// Entertainer's Garb material (Tier 1)
public static RegistryEntry<ArmorMaterial> entertainers_garb = material(
    "entertainers_garb",
    1, 3, 2, 1,  // Protection values
    9,           // Enchantability
    SoundEvents.ITEM_ARMOR_EQUIP_GENERIC,
    () -> Ingredient.fromTag(ItemTags.WOOL)
);

// Netherite Troubadour's Garb material (Tier 3)
public static RegistryEntry<ArmorMaterial> netherite_troubadours_garb = material(
    "netherite_troubadours_garb",
    1, 3, 2, 1,  // Protection values
    15,          // Enchantability
    SoundEvents.ITEM_ARMOR_EQUIP_NETHERITE,
    () -> Ingredient.ofItems(Items.NETHERITE_INGOT)
);

Armor materials

Available materials

entertainers_garb
RegistryEntry<ArmorMaterial>
Tier 1 bard armor material. Protection: 1/3/2/1, Enchantability: 9, Repair: Wool
troubadours_garb
RegistryEntry<ArmorMaterial>
Tier 2 bard armor material. Protection: 1/3/2/1, Enchantability: 10, Repair: Wool
netherite_troubadours_garb
RegistryEntry<ArmorMaterial>
Tier 3 bard armor material. Protection: 1/3/2/1, Enchantability: 15, Repair: Netherite Ingot
storytellers_garb
RegistryEntry<ArmorMaterial>
Tier 5 bard armor material. Protection: 1/3/2/1, Enchantability: 18, Repair: Netherite Ingot

Armor sets

Entertainer armor set

Tier 1 armor set with basic spell power and movement speed bonuses.
public static final Armor.Entry entertainerArmorSet = create(
    entertainers_garb,
    Identifier.of(MOD_ID, "entertainer_garb"),
    10,  // Durability
    1,   // Tier
    Armor.CustomItem::new,
    ArmorSetConfig.with(
        new ArmorSetConfig.Piece(1)  // Helmet
            .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
            .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
            .add(movementSpeed(0.03F)),
        new ArmorSetConfig.Piece(3)  // Chestplate
            .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
            .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
            .add(movementSpeed(0.03F)),
        new ArmorSetConfig.Piece(2)  // Leggings
            .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
            .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
            .add(movementSpeed(0.03F)),
        new ArmorSetConfig.Piece(1)  // Boots
            .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
            .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
            .add(movementSpeed(0.03F))
    ),
    commonSettings(null)
).translatedName("Entertainer Hat", "Entertainer Garb", "Entertainer Trousers", "Entertainer Boots");

Troubadour armor set

Tier 2 armor set with enhanced spell power and movement speed.
public static final Armor.Entry troubadourArmorSet = create(
    troubadours_garb,
    Identifier.of(MOD_ID, "troubadour_garb"),
    20,  // Durability
    2,   // Tier
    Armor.CustomItem::new,
    ArmorSetConfig.with(
        new ArmorSetConfig.Piece(1)
            .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.2F))
            .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.2F))
            .add(movementSpeed(0.04F)),
        // ... (similar for other pieces)
    ),
    commonSettings(null)
).translatedName("Troubadour Hat", "Troubadour Garb", "Troubadour Trousers", "Troubadour Boots");

Netherite troubadour armor set

Tier 3 armor set with high spell power and movement speed.
public static final Armor.Entry netheriteTroubadourArmorSet = create(
    netherite_troubadours_garb,
    Identifier.of(MOD_ID, "netherite_troubadour_garb"),
    30,  // Durability
    3,   // Tier
    Armor.CustomItem::new,
    ArmorSetConfig.with(
        new ArmorSetConfig.Piece(1)
            .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.25F))
            .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.25F))
            .add(movementSpeed(0.05F)),
        // ... (similar for other pieces)
    ),
    commonSettings(null)
).translatedName("Netherite Troubadour Hat", "Netherite Troubadour Garb", "Netherite Troubadour Trousers", "Netherite Troubadour Boots");

Storyteller armor set

Tier 5 armor set with maximum spell power and movement speed (requires Armory RPGs mod).
public static Armor.Entry storytellerArmorSet;

// Registered conditionally in register() method
if (FabricLoader.getInstance().isModLoaded("armory_rpgs") || 
    BardsMod.tweaksConfig.value.ignore_items_required_mods) {
    
    storytellerArmorSet = create(
        storytellers_garb,
        Identifier.of(MOD_ID, "storyteller_garb"),
        40,  // Durability
        5,   // Tier
        Armor.CustomItem::new,
        ArmorSetConfig.with(
            new ArmorSetConfig.Piece(1)
                .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.3F))
                .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.3F))
                .add(movementSpeed(0.06F)),
            // ... (similar for other pieces)
        ),
        commonSettings(null)
    ).translatedName("Storyteller Hat", "Storyteller Tunic", "Storyteller Trousers", "Storyteller Boots");
}

Attribute modifiers

Movement speed

Creates a movement speed attribute modifier.
value
float
required
The movement speed multiplier (e.g., 0.03 = 3% speed increase)
modifier
AttributeModifier
Returns a movement speed attribute modifier
private static AttributeModifier movementSpeed(float value) {
    return new AttributeModifier(
        "generic.movement_speed",
        value,
        EntityAttributeModifier.Operation.ADD_MULTIPLIED_BASE
    );
}

Spell power constants

bard_spell_power_t1
float
default:"0.15F"
Tier 1 spell power multiplier (15% bonus)
bard_spell_power_t2
float
default:"0.2F"
Tier 2 spell power multiplier (20% bonus)
bard_spell_power_t3
float
default:"0.25F"
Tier 3 spell power multiplier (25% bonus)
bard_spell_power_t5
float
default:"0.3F"
Tier 5 spell power multiplier (30% bonus)

Movement speed constants

bard_speed_T1
float
default:"0.03F"
Tier 1 movement speed multiplier (3% bonus)
bard_speed_T2
float
default:"0.04F"
Tier 2 movement speed multiplier (4% bonus)
bard_speed_T3
float
default:"0.05F"
Tier 3 movement speed multiplier (5% bonus)
bard_speed_T5
float
default:"0.06F"
Tier 5 movement speed multiplier (6% bonus)

Item settings

commonSettings()

Creates common item settings for armor pieces.
equipmentSetId
Identifier
Optional equipment set identifier for set bonuses
tweaker
Armor.ItemSettingsTweaker
Returns an item settings tweaker that sets equipment set component and rarity
private static Armor.ItemSettingsTweaker commonSettings(Identifier equipmentSetId) {
    return Armor.ItemSettingsTweaker.standard(itemSettings -> {
        itemSettings
            .component(SpellDataComponents.EQUIPMENT_SET, equipmentSetId)
            .component(DataComponentTypes.RARITY, Rarity.RARE);
    });
}

Data structures

Armor entries collection

entries
ArrayList<Armor.Entry>
Collection of all registered armor entries. This list is populated during initialization and used for registration.
public static final ArrayList<Armor.Entry> entries = new ArrayList<>();

Set passive identifier

storyteller_passive
Identifier
Identifier for the Storyteller armor set passive ability
public static Identifier storyteller_passive = Identifier.of(MOD_ID, "storyteller");

Full armor piece configuration

Each armor piece in a set is configured with:
new ArmorSetConfig.Piece(armorValue)
    .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, spellPowerMultiplier))
    .add(AttributeModifier.multiply(SpellSchools.HEALING.id, spellPowerMultiplier))
    .add(movementSpeed(speedMultiplier))

Example complete set

ArmorSetConfig.with(
    // Helmet
    new ArmorSetConfig.Piece(1)
        .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
        .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
        .add(movementSpeed(0.03F)),
    
    // Chestplate
    new ArmorSetConfig.Piece(3)
        .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
        .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
        .add(movementSpeed(0.03F)),
    
    // Leggings
    new ArmorSetConfig.Piece(2)
        .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
        .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
        .add(movementSpeed(0.03F)),
    
    // Boots
    new ArmorSetConfig.Piece(1)
        .add(AttributeModifier.multiply(SpellSchools.ARCANE.id, 0.15F))
        .add(AttributeModifier.multiply(SpellSchools.HEALING.id, 0.15F))
        .add(movementSpeed(0.03F))
)

Build docs developers (and LLMs) love