peytonplayz585-c0.0.23a_01/source/net/minecraft/src/SlotArmor.java

21 lines
561 B
Java
Raw Normal View History

2023-09-22 23:47:15 -07:00
package net.minecraft.src;
class SlotArmor extends Slot {
final int armorType;
final GuiInventory guiInventory;
SlotArmor(GuiInventory var1, GuiContainer var2, IInventory var3, int var4, int var5, int var6, int var7) {
super(var2, var3, var4, var5, var6);
this.guiInventory = var1;
this.armorType = var7;
}
public boolean isItemValid(ItemStack var1) {
return var1.getItem() instanceof ItemArmor ? ((ItemArmor)var1.getItem()).armorType == this.armorType : false;
}
public int getBackgroundIconIndex() {
return 15 + this.armorType * 16;
}
}