本文整理汇总了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;
}