mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-28 21:38:44 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -8,35 +8,35 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import noppes.npcs.roles.RoleCompanion;
|
||||
|
||||
class SlotCompanionArmor extends Slot{
|
||||
class SlotCompanionArmor extends Slot {
|
||||
|
||||
final int armorType;
|
||||
final RoleCompanion role;
|
||||
|
||||
public SlotCompanionArmor(RoleCompanion role, IInventory iinventory, int id, int x, int y, int type){
|
||||
public SlotCompanionArmor(RoleCompanion role, IInventory iinventory, int id, int x, int y, int type) {
|
||||
super(iinventory, id, x, y);
|
||||
armorType = type;
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
@Override
|
||||
public int getSlotStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBackgroundIconIndex() {
|
||||
return ItemArmor.func_94602_b(this.armorType);
|
||||
}
|
||||
@Override
|
||||
public IIcon getBackgroundIconIndex() {
|
||||
return ItemArmor.func_94602_b(this.armorType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemstack) {
|
||||
if (itemstack.getItem() instanceof ItemArmor && role.canWearArmor(itemstack))
|
||||
return ((ItemArmor) itemstack.getItem()).armorType == armorType;
|
||||
|
||||
if (itemstack.getItem() instanceof ItemBlock)
|
||||
return armorType == 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemstack) {
|
||||
if (itemstack.getItem() instanceof ItemArmor && role.canWearArmor(itemstack))
|
||||
return ((ItemArmor) itemstack.getItem()).armorType == armorType;
|
||||
|
||||
if (itemstack.getItem() instanceof ItemBlock)
|
||||
return armorType == 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user