Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.03 KB | None | 0 0
  1. package com.couchdoescode.tea.handlers;
  2.  
  3. import com.couchdoescode.tea.potion.*;
  4.  
  5. import net.minecraft.init.*;
  6. import net.minecraft.item.*;
  7. import net.minecraft.potion.*;
  8. import net.minecraft.util.text.*;
  9. import net.minecraftforge.common.brewing.*;
  10.  
  11. public class TeaHandler {
  12.     public static Potion potionCaffeine;
  13.    
  14.     private static PotionTeas createPotion(String name, boolean isBad){
  15.         PotionTeas potion = new PotionTeas(name, isBad, 0x4D2B00);
  16.         potion.setPotionName(new TextComponentTranslation("effect." + name + ".name").getUnformattedText());
  17.         return potion;
  18.     }
  19.    
  20.     public static void init(){
  21.         potionCaffeine = createPotion("caffeine", false);
  22.     }
  23.    
  24.     public static void register(){
  25.         ItemStack potionStack = new ItemStack(new NBTCompound("potion"));
  26.         BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionType.getPotionTypeForName("water")), new ItemStack(ItemHandler.blackTeaLeaf), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), potionCaffeine));
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement