本文整理汇总了Java中net.minecraft.item.ItemSoup类的典型用法代码示例。如果您正苦于以下问题:Java ItemSoup类的具体用法?Java ItemSoup怎么用?Java ItemSoup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemSoup类属于net.minecraft.item包,在下文中一共展示了ItemSoup类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findSoup
import net.minecraft.item.ItemSoup; //导入依赖的package包/类
private int findSoup(int startSlot, int endSlot)
{
for(int i = startSlot; i < endSlot; i++)
{
ItemStack stack =
WMinecraft.getPlayer().inventory.getStackInSlot(i);
if(stack != null && stack.getItem() instanceof ItemSoup)
return i;
}
return -1;
}
示例2: hotbarHasSoups
import net.minecraft.item.ItemSoup; //导入依赖的package包/类
private boolean hotbarHasSoups() {
for (int index = 36; index < 45; index++) {
ItemStack itemStack = mc.thePlayer.inventoryContainer.getSlot(index).getStack();
if (itemStack != null) {
if (itemStack.getItem() instanceof ItemSoup) {
return true;
}
}
}
return false;
}
示例3: countSoups
import net.minecraft.item.ItemSoup; //导入依赖的package包/类
private int countSoups() {
int items = 0;
for (int index = 9; index < 45; index++) {
ItemStack itemStack = mc.thePlayer.inventoryContainer.getSlot(index).getStack();
if (itemStack != null) {
if (itemStack.getItem() instanceof ItemSoup) {
items += itemStack.stackSize;
}
}
}
return items;
}