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