當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。