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
The unique identifier for this armor set
Base durability multiplier for the armor pieces
Loot tier level (determines loot table generation)
factory
Armor.Set.ItemFactory
required
Factory function to create armor item instances
Default configuration with armor values and attributes
settings
Armor.ItemSettingsTweaker
required
Item settings tweaker for additional properties
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.
The registry name of the armor material
Armor points for chestplate
Armor points for leggings
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.
The movement speed multiplier (e.g., 0.03 = 3% speed increase)
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
Tier 1 spell power multiplier (15% bonus)
Tier 2 spell power multiplier (20% bonus)
Tier 3 spell power multiplier (25% bonus)
Tier 5 spell power multiplier (30% bonus)
Movement speed constants
Tier 1 movement speed multiplier (3% bonus)
Tier 2 movement speed multiplier (4% bonus)
Tier 3 movement speed multiplier (5% bonus)
Tier 5 movement speed multiplier (6% bonus)
Item settings
commonSettings()
Creates common item settings for armor pieces.
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
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
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))
)