本文整理匯總了Java中net.minecraft.potion.PotionHelper.hasConversions方法的典型用法代碼示例。如果您正苦於以下問題:Java PotionHelper.hasConversions方法的具體用法?Java PotionHelper.hasConversions怎麽用?Java PotionHelper.hasConversions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.potion.PotionHelper
的用法示例。
在下文中一共展示了PotionHelper.hasConversions方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: 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);
}
}