All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.magistuarmory.item.armor.DyeableMedievalArmorItem Maven / Gradle / Ivy

There is a newer version: 8.10
Show newest version
package com.magistuarmory.item.armor;

import net.minecraft.class_1741;
import net.minecraft.class_1768;
import net.minecraft.class_1799;
import net.minecraft.class_2487;

public class DyeableMedievalArmorItem extends MedievalArmorItem implements class_1768
{
    int defaultcolor;

	public DyeableMedievalArmorItem(class_1741 material, class_8051 type, class_1793 properties, int defaultcolor)
    {
        super(material, type, properties);
        this.defaultcolor = defaultcolor;
    }

    @Override
    public int method_7800(class_1799 stack)
    {
        class_2487 compoundnbt = stack.method_7941("display");
        return compoundnbt != null && compoundnbt.method_10573("color", 99) ? compoundnbt.method_10550("color") : defaultcolor;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy