Advertisement
ShetiPhian

ItemEatWeirdlySeed

Jul 7th, 2013
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package brenden.eatweirdly;
  2.  
  3. import java.util.List;
  4. import net.minecraft.creativetab.CreativeTabs;
  5. import net.minecraft.entity.player.EntityPlayer;
  6. import net.minecraft.item.ItemSeedFood;
  7. import net.minecraft.item.ItemStack;
  8.  
  9. public class ItemEatWeirdlySeed extends ItemSeedFood
  10. {
  11.     String[] subText;
  12.     public ItemEatWeirdlySeed(int id, int foodValue, float saturation, int cropId, int soilId, String...subText)
  13.     {
  14.         super(id, foodValue, saturation, cropId, soilId);
  15.         this.subText = subText;
  16.         setCreativeTab(CreativeTabs.tabBrewing);
  17.         setAlwaysEdible();
  18.     }
  19.  
  20.     public ItemEatWeirdlySeed setEatEffect(int potionId, int potionDuration, int potionAmplifier, float potionProbability)
  21.     {
  22.         setPotionEffect(potionId, potionDuration, potionAmplifier, potionProbability);
  23.         return this;
  24.     }
  25.  
  26.     public ItemEatWeirdlySeed setBrewEffect(String brewEffect)
  27.     {
  28.         setPotionEffect(brewEffect);
  29.         return this;
  30.     }
  31.  
  32.     public ItemEatWeirdlySeed setNameAndIcon(String name, String texture)
  33.     {
  34.         setUnlocalizedName(name);
  35.         func_111206_d(texture);
  36.         return this;
  37.     }
  38.  
  39.     @Override
  40.     public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean par4)
  41.     {
  42.         if (this.subText != null && this.subText.length > 0) {
  43.             for (String text : this.subText){
  44.                 list.add(text);
  45.             }
  46.         }
  47.     }
  48. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement