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


Java ItemElectricBase类代码示例

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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