本文整理汇总了Java中micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase.isElectricItem方法的典型用法代码示例。如果您正苦于以下问题:Java ItemElectricBase.isElectricItem方法的具体用法?Java ItemElectricBase.isElectricItem怎么用?Java ItemElectricBase.isElectricItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase
的用法示例。
在下文中一共展示了ItemElectricBase.isElectricItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: canInsertItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean canInsertItem(int slotID, ItemStack itemstack, int side)
{
if (this.isItemValidForSlot(slotID, itemstack))
{
switch (slotID)
{
case 0:
return ItemElectricBase.isElectricItem(itemstack.getItem());
case 3:
return itemstack.getItem() == MarsItems.carbonFragments;
case 4:
return FluidUtil.isEmptyContainer(itemstack, AsteroidsItems.methaneCanister);
default:
return false;
}
}
return false;
}
示例2: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
switch (slotID)
{
case 0:
return ItemElectricBase.isElectricItem(itemstack.getItem());
case 1:
return false;
case 2:
return itemstack.getItem() instanceof ItemAtmosphericValve;
case 3:
return itemstack.getItem() == MarsItems.carbonFragments;
case 4:
return FluidUtil.isValidContainer(itemstack);
}
return false;
}
示例3: canInsertItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean canInsertItem(int slotID, ItemStack itemstack, int side)
{
if (side != this.getBlockMetadata() + 2)
{
if (slotID == 0)
{
return ItemElectricBase.isElectricItem(itemstack.getItem());
}
else
{
return true;
}
}
return false;
}
示例4: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemStack)
{
if (slotID == 0) return itemStack != null && ItemElectricBase.isElectricItem(itemStack.getItem());
if (slotID > 5) return false;
ArrayList<ItemStack> list = CircuitFabricatorRecipes.slotValidItems.get(slotID - 1);
for (ItemStack test : list)
{
if (test.isItemEqual(itemStack)) return true;
}
return false;
}
示例5: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemStack)
{
if (slotID == 0)
{
return itemStack != null && ItemElectricBase.isElectricItem(itemStack.getItem());
}
else if (slotID >= 3)
{
if (this.producingStack != null)
{
ItemStack stackInSlot = this.getStackInSlot(slotID);
return stackInSlot != null && stackInSlot.isItemEqual(itemStack);
}
return TileEntityIngotCompressor.isItemCompressorInput(itemStack);
}
return false;
}
示例6: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
if (side != this.getBlockMetadata() - 2)
{
if (slotID == 0)
{
return ItemElectricBase.isElectricItem(itemstack.getItem());
}
else
{
return true;
}
}
return false;
}
示例7: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack) {
if(itemstack == null) return false;
switch(slotID) {
case 0:
FluidStack containedFluid = FluidContainerRegistry.getFluidForFilledItem(itemstack);
if(containedFluid != null && containedFluid.getFluid() == fuel) {
return true;
}
break;
case 1:
return ItemElectricBase.isElectricItem(itemstack.getItem());
}
return false;
// return (slotID == 0 && itemstack != null && itemstack.getItem() == GCItems.fuelCanister);
}
示例8: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
Item item = itemstack.getItem();
switch (slotID)
{
case 0:
return ItemElectricBase.isElectricItem(item);
case 1:
return item == Items.bucket || item == Items.water_bucket;
}
return false;
}
示例9: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
if (slotID == 0)
{
return ItemElectricBase.isElectricItem(itemstack.getItem());
}
else
{
return true;
}
}
示例10: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
if (this.isMaster)
return slotID > 0 || ItemElectricBase.isElectricItem(itemstack.getItem());
TileEntityMinerBase master = this.getMaster();
if (master != null)
{
return master.isItemValidForSlot(slotID, itemstack);
}
return false;
}
示例11: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
switch (slotID)
{
case 0:
return itemstack.getItem() instanceof ItemOxygenTank;
case 1:
return ItemElectricBase.isElectricItem(itemstack.getItem());
}
return false;
}
示例12: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
/**
* Returns true if automation is allowed to insert the given stack (ignoring
* stack size) into the given slot.
*/
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemStack)
{
if (itemStack == null) return false;
return slotID == 1 ? FurnaceRecipes.smelting().getSmeltingResult(itemStack) != null : slotID == 0 && ItemElectricBase.isElectricItem(itemStack.getItem());
}
示例13: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
switch (slotID)
{
case 0:
return itemstack != null && ItemElectricBase.isElectricItem(itemstack.getItem());
case 1:
case 2:
return FluidUtil.isValidContainer(itemstack);
}
return false;
}
示例14: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
if (itemstack == null) return false;
if (slotID == 0) return ItemElectricBase.isElectricItem(itemstack.getItem());
if (slotID == 1) return itemstack.getItem() instanceof IItemOxygenSupply;
if (slotID == 2) return itemstack.getItem() == GCItems.basicItem && itemstack.getItemDamage() == 20;
return false;
}
示例15: isItemValidForSlot
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入方法依赖的package包/类
@Override
public boolean isItemValidForSlot(int slotID, ItemStack itemstack)
{
if (itemstack == null) return false;
if (slotID == 0) return ItemElectricBase.isElectricItem(itemstack.getItem());
if (slotID == 1) return itemstack.getItem() instanceof IItemOxygenSupply;
return false;
}