当前位置: 首页>>代码示例>>Java>>正文


Java ItemElectricBase.isElectricItem方法代码示例

本文整理汇总了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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:20,代码来源:TileEntityMethaneSynthesizer.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:20,代码来源:TileEntityMethaneSynthesizer.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:18,代码来源:TileEntityCargoLoader.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:17,代码来源:TileEntityCircuitFabricator.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:20,代码来源:TileEntityElectricIngotCompressor.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:18,代码来源:TileEntityCargoUnloader.java

示例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);
}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:19,代码来源:TileEntityMothershipEngineIon.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:15,代码来源:TileEntityElectrolyzer.java

示例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;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:TileEntityCargoLoader.java

示例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;    	   
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:TileEntityMinerBase.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:14,代码来源:TileEntityOxygenDecompressor.java

示例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());
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:11,代码来源:TileEntityElectricFurnace.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:15,代码来源:TileEntityRefinery.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:10,代码来源:TileEntityOxygenSealer.java

示例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;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:TileEntityOxygenDistributor.java


注:本文中的micdoodle8.mods.galacticraft.core.energy.item.ItemElectricBase.isElectricItem方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。