本文整理匯總了Java中net.minecraft.init.Items.BEETROOT屬性的典型用法代碼示例。如果您正苦於以下問題:Java Items.BEETROOT屬性的具體用法?Java Items.BEETROOT怎麽用?Java Items.BEETROOT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類net.minecraft.init.Items
的用法示例。
在下文中一共展示了Items.BEETROOT屬性的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: hasEnoughItems
/**
* Returns true if villager has enough items in inventory
*/
private boolean hasEnoughItems(int multiplier)
{
boolean flag = this.getProfession() == 0;
for (int i = 0; i < this.villagerInventory.getSizeInventory(); ++i)
{
ItemStack itemstack = this.villagerInventory.getStackInSlot(i);
if (!itemstack.func_190926_b())
{
if (itemstack.getItem() == Items.BREAD && itemstack.func_190916_E() >= 3 * multiplier || itemstack.getItem() == Items.POTATO && itemstack.func_190916_E() >= 12 * multiplier || itemstack.getItem() == Items.CARROT && itemstack.func_190916_E() >= 12 * multiplier || itemstack.getItem() == Items.BEETROOT && itemstack.func_190916_E() >= 12 * multiplier)
{
return true;
}
if (flag && itemstack.getItem() == Items.WHEAT && itemstack.func_190916_E() >= 9 * multiplier)
{
return true;
}
}
}
return false;
}
示例2: hasEnoughItems
/**
* Returns true if villager has enough items in inventory
*/
private boolean hasEnoughItems(int multiplier)
{
boolean flag = this.getProfession() == 0;
for (int i = 0; i < this.villagerInventory.getSizeInventory(); ++i)
{
ItemStack itemstack = this.villagerInventory.getStackInSlot(i);
if (itemstack != null)
{
if (itemstack.getItem() == Items.BREAD && itemstack.stackSize >= 3 * multiplier || itemstack.getItem() == Items.POTATO && itemstack.stackSize >= 12 * multiplier || itemstack.getItem() == Items.CARROT && itemstack.stackSize >= 12 * multiplier || itemstack.getItem() == Items.BEETROOT && itemstack.stackSize >= 12 * multiplier)
{
return true;
}
if (flag && itemstack.getItem() == Items.WHEAT && itemstack.stackSize >= 9 * multiplier)
{
return true;
}
}
}
return false;
}
示例3: getCrop
protected Item getCrop() {
return Items.BEETROOT;
}
示例4: canVillagerPickupItem
private boolean canVillagerPickupItem(Item itemIn)
{
return itemIn == Items.BREAD || itemIn == Items.POTATO || itemIn == Items.CARROT || itemIn == Items.WHEAT || itemIn == Items.WHEAT_SEEDS || itemIn == Items.BEETROOT || itemIn == Items.BEETROOT_SEEDS;
}
示例5: getCrop
protected Item getCrop()
{
return Items.BEETROOT;
}