instead of adding all 4 armor pieces, i only wanted the boots. that's why i only added the boots texture in the layer.png, but that didn't work so i added the leggings with it and it used the leggings instead of the boots and i have no idea why
iteminit:
public static final RegistryObject<ArmorItem> lIGHTNING_BOOTS = ITEMS.register("lightning_boots",
() -> new ArmorItem(ArmorMaterialsInit.LIGHTNING_BOOTS, EquipmentSlot.FEET,
new Item.Properties().tab(Electrified.ELECTRIFIED_TAB)));
armorMaterialsInit:
package com.tobywig.electrified.init;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.util.LazyLoadedValue;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.crafting.Ingredient;
import java.util.function.Supplier;
import com.tobywig.electrified.Electrified;
public enum ArmorMaterialsInit implements ArmorMaterial {
LIGHTNING_BOOTS("lightning_boots", 28, new int[]{3, 5, 8, 3}, 19, SoundEvents.ARMOR_EQUIP_GOLD,
2.0F, 0.0F, () -> Ingredient.of(itemInit.ELECTRIFIED_IRON_INGOT.get()));
private static final int[] HEALTH_PER_SLOT = new int[]{13, 15, 16, 11};
private final String name;
private final int durabilityMultiplier;
private final int[] slotProtections;
private final int enchantmentValue;
private final SoundEvent sound;
private final float toughness;
private final float knockbackResistance;
private final LazyLoadedValue<Ingredient> repairIngredient;
ArmorMaterialsInit(String p_40474_, int p_40475_, int[] p_40476_, int p_40477_,
SoundEvent p_40478_, float p_40479_, float p_40480_, Supplier<Ingredient> p_40481_) {
this.name = p_40474_;
this.durabilityMultiplier = p_40475_;
this.slotProtections = p_40476_;
this.enchantmentValue = p_40477_;
this.sound = p_40478_;
this.toughness = p_40479_;
this.knockbackResistance = p_40480_;
this.repairIngredient = new LazyLoadedValue<>(p_40481_);
}
public int getDurabilityForSlot(EquipmentSlot pSlot) {
return HEALTH_PER_SLOT[pSlot.getIndex()] * this.durabilityMultiplier;
}
public int getDefenseForSlot(EquipmentSlot pSlot) {
return this.slotProtections[pSlot.getIndex()];
}
public int getEnchantmentValue() {
return this.enchantmentValue;
}
public SoundEvent getEquipSound() {
return this.sound;
}
public Ingredient getRepairIngredient() {
return this.repairIngredient.get();
}
public String getName() {
return Electrified.MOD_ID + ":" + this.name;
}
public float getToughness() {
return this.toughness;
}
public float getKnockbackResistance() {
return this.knockbackResistance;
}
}