com.magistuarmory.item.armor.DyeableMedievalArmorItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of 1.19.2-epic-knights-fabric Show documentation
Show all versions of 1.19.2-epic-knights-fabric Show documentation
mod that adds medieval stuff to the game
The newest version!
package com.magistuarmory.item.armor;
import net.minecraft.class_1304;
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_1304 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;
}
}