Jump to content

when equiping my custom boots they use the texture layer of leggings


Recommended Posts

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



			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)));



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;


Link to comment
Share on other sites

2 minutes ago, magic_man said:

maybe it has to do with me adding a helmet? also changing it from layer 2 to layer 1 didn't change anything so now i think it's using something of the helmet

No the textures do not have the correct positions inside the textures.
Take a look at the vanilla armor layer textures.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.