mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 03:34:24 +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
@@ -7,41 +7,33 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
class SlotNPCArmor extends Slot
|
||||
{
|
||||
class SlotNPCArmor extends Slot {
|
||||
|
||||
final int armorType; /* synthetic field */
|
||||
|
||||
SlotNPCArmor(IInventory iinventory, int i, int j, int k, int l)
|
||||
{
|
||||
SlotNPCArmor(IInventory iinventory, int i, int j, int k, int l) {
|
||||
super(iinventory, i, j, k);
|
||||
armorType = l;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit()
|
||||
{
|
||||
public int getSlotStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBackgroundIconIndex()
|
||||
{
|
||||
public IIcon getBackgroundIconIndex() {
|
||||
return ItemArmor.func_94602_b(this.armorType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.getItem() instanceof ItemArmor)
|
||||
{
|
||||
return ((ItemArmor)itemstack.getItem()).armorType == armorType;
|
||||
public boolean isItemValid(ItemStack itemstack) {
|
||||
if (itemstack.getItem() instanceof ItemArmor) {
|
||||
return ((ItemArmor) itemstack.getItem()).armorType == armorType;
|
||||
}
|
||||
if(itemstack.getItem() instanceof ItemBlock)
|
||||
{
|
||||
if (itemstack.getItem() instanceof ItemBlock) {
|
||||
return armorType == 0;
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user