本文整理汇总了Java中micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase类的典型用法代码示例。如果您正苦于以下问题:Java ItemElectricBase类的具体用法?Java ItemElectricBase怎么用?Java ItemElectricBase使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ItemElectricBase类属于micdoodle8.mods.galacticraft.core.energy.item包,在下文中一共展示了ItemElectricBase类的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: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
if (this.isItemValidForSlot(slotID, itemstack))
{
switch (slotID)
{
case 0:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) <= 0 || !this.shouldPullEnergy();
case 4:
return FluidUtil.isFullContainer(itemstack);
default:
return false;
}
}
return false;
}
示例3: 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;
}
示例4: 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 1:
return itemstack.getItem() == Items.water_bucket;
default:
return false;
}
}
return false;
}
示例5: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
if (this.isItemValidForSlot(slotID, itemstack))
{
switch (slotID)
{
case 0:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) <= 0;
case 1:
return itemstack.getItem() == Items.bucket;
default:
return false;
}
}
return false;
}
示例6: 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 itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) > 0;
case 1:
return FluidUtil.isMethaneContainerAny(itemstack);
case 2:
return FluidUtil.isEmptyContainerFor(itemstack, this.liquidTank.getFluid());
case 3:
return FluidUtil.isEmptyContainerFor(itemstack, this.liquidTank2.getFluid());
default:
return false;
}
}
return false;
}
示例7: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
switch (slotID)
{
case 0:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) <= 0;
case 1:
return FluidUtil.isEmptyContainer(itemstack);
case 2:
return FluidUtil.isFullContainer(itemstack);
case 3:
return FluidUtil.isFullContainer(itemstack);
default:
return false;
}
}
示例8: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
if (this.isMaster)
{
if (side != this.facing + 2)
{
return slotID > 0 || ItemElectricBase.isElectricItemEmpty(itemstack);
}
return false;
}
TileEntityMinerBase master = this.getMaster();
if (master != null)
{
return master.canExtractItem(slotID, itemstack, side);
}
return false;
}
示例9: 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 itemstack.getItemDamage() < itemstack.getMaxDamage();
case 1:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) > 0;
default:
return false;
}
}
return false;
}
示例10: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
if (this.isItemValidForSlot(slotID, itemstack))
{
switch (slotID)
{
case 0:
return itemstack.getItemDamage() == itemstack.getMaxDamage();
case 1:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) <= 0;
default:
return false;
}
}
return false;
}
示例11: 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;
}
示例12: canInsertItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canInsertItem(int slotID, ItemStack itemstack, int side)
{
if (itemstack != null && this.isItemValidForSlot(slotID, itemstack))
{
switch (slotID)
{
case 0:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) > 0;
case 1:
return FluidUtil.isOilContainerAny(itemstack);
case 2:
return FluidUtil.isEmptyContainer(itemstack, GCItems.fuelCanister);
default:
return false;
}
}
return false;
}
示例13: canExtractItem
import micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase; //导入依赖的package包/类
@Override
public boolean canExtractItem(int slotID, ItemStack itemstack, int side)
{
if (itemstack != null && this.isItemValidForSlot(slotID, itemstack))
{
switch (slotID)
{
case 0:
return itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) <= 0 || !this.shouldPullEnergy();
case 1:
return FluidUtil.isEmptyContainer(itemstack);
case 2:
return FluidUtil.isFullContainer(itemstack);
default:
return false;
}
}
return false;
}
示例14: 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;
}
示例15: 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 itemstack.getItem() instanceof ItemElectricBase && ((ItemElectricBase) itemstack.getItem()).getElectricityStored(itemstack) > 0;
case 1:
return itemstack.getItemDamage() < itemstack.getItem().getMaxDamage();
case 2:
return itemstack.getItem() == GCItems.basicItem && itemstack.getItemDamage() == 20;
default:
return false;
}
}
return false;
}