本文整理汇总了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;
}
}
示例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;
}
}
示例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);
}
}
示例4: isItemValid
import net.minecraft.potion.PotionHelper; //导入方法依赖的package包/类
public boolean isItemValid(ItemStack stack)
{
return PotionHelper.isReagent(stack);
}
示例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);
}