當前位置: 首頁>>代碼示例>>Java>>正文


Java PotionHelper.addMix方法代碼示例

本文整理匯總了Java中net.minecraft.potion.PotionHelper.addMix方法的典型用法代碼示例。如果您正苦於以下問題:Java PotionHelper.addMix方法的具體用法?Java PotionHelper.addMix怎麽用?Java PotionHelper.addMix使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.potion.PotionHelper的用法示例。


在下文中一共展示了PotionHelper.addMix方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: registerPotionTypes

import net.minecraft.potion.PotionHelper; //導入方法依賴的package包/類
@SubscribeEvent
public static void registerPotionTypes(final RegistryEvent.Register<PotionType> event) {
    event.getRegistry().registerAll(PURIFICATION_TYPE, RUST_TYPE, BONE_SKIN_TYPE, RECALL_TYPE, BURNING_TYPE, BLEEDING_TYPE,
            INFERNO_TYPE);
    event.getRegistry().registerAll(HUNGER_TYPE, BLINDNESS_TYPE, NAUSEA_TYPE, RESISTANCE_TYPE, LEVITATION_TYPE);

    PotionHelper.addMix(PotionTypes.AWKWARD, GSItem.TOXIC_SLIME, RUST_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.GOLDEN_KOI.ordinal())), PURIFICATION_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.BONE_FISH.ordinal())), BONE_SKIN_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.SPECULAR_FISH.ordinal())), RECALL_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.MAGMA_JELLYFISH.ordinal())), BURNING_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.PIRANHA.ordinal())), BLEEDING_TYPE);
    PotionHelper.addMix(BURNING_TYPE, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.FLAREFIN_KOI.ordinal())), INFERNO_TYPE);

    // vanilla potions
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(Items.FISH, 1, 2)), PotionType.getPotionTypeForName("luck"));
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(Items.ROTTEN_FLESH, 1)), HUNGER_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.BLUE_JELLYFISH.ordinal())), NAUSEA_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.SPOOKYFIN.ordinal())), BLINDNESS_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.CAVEFISH.ordinal())), RESISTANCE_TYPE);
    PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromStacks(new ItemStack(GSItem.FISH, 1, ItemFish.EnumFishType.CHORUS_KOI.ordinal())), LEVITATION_TYPE);
}
 
開發者ID:NightKosh,項目名稱:Gravestone-mod-Extended,代碼行數:23,代碼來源:GSPotion.java

示例2: initRecipes

import net.minecraft.potion.PotionHelper; //導入方法依賴的package包/類
public static void initRecipes() {
	PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromItem(Items.EMERALD), TQPotionTypes.ROYALTY);
	PotionHelper.addMix(TQPotionTypes.ROYALTY, Ingredient.fromItem(Items.REDSTONE), TQPotionTypes.ROYALTY_LONG);
	PotionHelper.addMix(TQPotionTypes.ROYALTY, Ingredient.fromItem(Items.GLOWSTONE_DUST), TQPotionTypes.ROYALTY_STRONG);

	PotionHelper.addMix(PotionTypes.AWKWARD, Ingredient.fromItem(Items.DIAMOND), TQPotionTypes.LOYALTY);
	PotionHelper.addMix(TQPotionTypes.LOYALTY, Ingredient.fromItem(Items.REDSTONE), TQPotionTypes.LOYALTY_LONG);
	PotionHelper.addMix(TQPotionTypes.LOYALTY, Ingredient.fromItem(Items.GLOWSTONE_DUST), TQPotionTypes.LOYALTY_STRONG);
}
 
開發者ID:ToroCraft,項目名稱:ToroQuest,代碼行數:10,代碼來源:Potions.java

示例3: addMix

import net.minecraft.potion.PotionHelper; //導入方法依賴的package包/類
public void addMix() {
  PotionHelper.addMix(base, Ingredient.fromStacks(recipeStack), this);
}
 
開發者ID:PrinceOfAmber,項目名稱:Cyclic,代碼行數:4,代碼來源:PotionTypeCyclic.java

示例4: registerPotionTypeConversion

import net.minecraft.potion.PotionHelper; //導入方法依賴的package包/類
/**
 * Registers a conversion from one PotionType to another PotionType, with the
 * given reagent
 */
private void registerPotionTypeConversion(PotionType input, Ingredient ingredient, PotionType output) {
    PotionHelper.addMix(input, ingredient, output);
}
 
開發者ID:SleepyTrousers,項目名稱:EnderZoo,代碼行數:8,代碼來源:Potions.java


注:本文中的net.minecraft.potion.PotionHelper.addMix方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。