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


Java PotionHelper.isReagent方法代码示例

本文整理汇总了Java中net.minecraft.potion.PotionHelper.isReagent方法的典型用法代码示例。如果您正苦于以下问题:Java PotionHelper.isReagent方法的具体用法?Java PotionHelper.isReagent怎么用?Java PotionHelper.isReagent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.potion.PotionHelper的用法示例。


在下文中一共展示了PotionHelper.isReagent方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: canBrew

import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
private boolean canBrew()
{
    ItemStack itemstack = (ItemStack)this.brewingItemStacks.get(3);

    if (itemstack.func_190926_b())
    {
        return false;
    }
    else if (!PotionHelper.isReagent(itemstack))
    {
        return false;
    }
    else
    {
        for (int i = 0; i < 3; ++i)
        {
            ItemStack itemstack1 = (ItemStack)this.brewingItemStacks.get(i);

            if (!itemstack1.func_190926_b() && PotionHelper.hasConversions(itemstack1, itemstack))
            {
                return true;
            }
        }

        return false;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:28,代码来源:TileEntityBrewingStand.java

示例2: isItemValidForSlot

import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
/**
 * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot. For
 * guis use Slot.isItemValid
 */
public boolean isItemValidForSlot(int index, ItemStack stack)
{
    if (index == 3)
    {
        return PotionHelper.isReagent(stack);
    }
    else
    {
        Item item = stack.getItem();
        return index == 4 ? item == Items.BLAZE_POWDER : (item == Items.POTIONITEM || item == Items.SPLASH_POTION || item == Items.LINGERING_POTION || item == Items.GLASS_BOTTLE) && this.getStackInSlot(index) == ItemStack.field_190927_a;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:TileEntityBrewingStand.java

示例3: canBrew

import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
private boolean canBrew()
{
    if (this.brewingItemStacks[3] != null && this.brewingItemStacks[3].stackSize > 0 && false) // Code moved to net.minecraftforge.common.brewing.VanillaBrewingRecipe
    {
        ItemStack itemstack = this.brewingItemStacks[3];

        if (!PotionHelper.isReagent(itemstack))
        {
            return false;
        }
        else
        {
            for (int i = 0; i < 3; ++i)
            {
                ItemStack itemstack1 = this.brewingItemStacks[i];

                if (itemstack1 != null && PotionHelper.hasConversions(itemstack1, itemstack))
                {
                    return true;
                }
            }

            return false;
        }
    }
    else
    {
        return net.minecraftforge.common.brewing.BrewingRecipeRegistry.canBrew(brewingItemStacks, brewingItemStacks[3], OUTPUT_SLOTS);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:31,代码来源:TileEntityBrewingStand.java

示例4: isItemValid

import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
public boolean isItemValid(ItemStack stack)
{
    return PotionHelper.isReagent(stack);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:ContainerBrewingStand.java

示例5: isIngredient

import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
/**
 * Code adapted from TileEntityBrewingStand.isItemValidForSlot(int index, ItemStack stack)
 */
@Override
public boolean isIngredient(ItemStack stack)
{
    return PotionHelper.isReagent(stack);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:VanillaBrewingRecipe.java


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