本文整理汇总了Java中net.minecraft.potion.PotionType.REGISTRY属性的典型用法代码示例。如果您正苦于以下问题:Java PotionType.REGISTRY属性的具体用法?Java PotionType.REGISTRY怎么用?Java PotionType.REGISTRY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类net.minecraft.potion.PotionType
的用法示例。
在下文中一共展示了PotionType.REGISTRY属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSubItems
/**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems)
{
for (PotionType potiontype : PotionType.REGISTRY)
{
if (potiontype != PotionTypes.EMPTY)
{
subItems.add(PotionUtils.addPotionToItemStack(new ItemStack(itemIn), potiontype));
}
}
}
示例2: getSubItems
/**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems)
{
for (PotionType potiontype : PotionType.REGISTRY)
{
if (!potiontype.getEffects().isEmpty())
{
subItems.add(PotionUtils.addPotionToItemStack(new ItemStack(itemIn), potiontype));
}
}
}
示例3: getSubItems
/**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/
@SideOnly(Side.CLIENT)
public void getSubItems(Item itemIn, CreativeTabs tab, List<ItemStack> subItems)
{
for (PotionType potiontype : PotionType.REGISTRY)
{
subItems.add(PotionUtils.addPotionToItemStack(new ItemStack(itemIn), potiontype));
}
}
示例4: addTippedArrowRecipes
public void addTippedArrowRecipes(ArrayList<DrawableRecipe> list) {
ItemStack arrow = new ItemStack(Items.ARROW);
for (PotionType type : PotionType.REGISTRY) {
ItemStack input = new ItemStack(Items.LINGERING_POTION);
PotionUtils.addPotionToItemStack(input, type);
ItemStack output = new ItemStack(Items.TIPPED_ARROW, 8);
PotionUtils.addPotionToItemStack(output, type);
list.add(new DrawableRecipeCrafting(output, new ItemStack[]{arrow, arrow, arrow, arrow, input, arrow, arrow, arrow, arrow}, 3));
}
}
示例5: updatePotions
private void updatePotions() {
for (PotionType potiontype : PotionType.REGISTRY) {
String potionName = potiontype.getRegistryName().toString();
if (!ucPriceMap.containsKey(potionName)) {
ucPriceMap.put(potionName, -1);
}
}
}