Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.couchdoescode.tea.handlers;
- import com.couchdoescode.tea.potion.*;
- import net.minecraft.init.*;
- import net.minecraft.item.*;
- import net.minecraft.potion.*;
- import net.minecraft.util.text.*;
- import net.minecraftforge.common.brewing.*;
- public class TeaHandler {
- public static Potion potionCaffeine;
- private static PotionTeas createPotion(String name, boolean isBad){
- PotionTeas potion = new PotionTeas(name, isBad, 0x4D2B00);
- potion.setPotionName(new TextComponentTranslation("effect." + name + ".name").getUnformattedText());
- return potion;
- }
- public static void init(){
- potionCaffeine = createPotion("caffeine", false);
- }
- public static void register(){
- ItemStack potionStack = new ItemStack(new NBTCompound("potion"));
- BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionType.getPotionTypeForName("water")), new ItemStack(ItemHandler.blackTeaLeaf), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), potionCaffeine));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement