Guest User

Untitled

a guest
Jun 24th, 2014
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.35 KB | None | 0 0
  1. package com.malkuthe.apotheosis.items;
  2.  
  3. import com.malkuthe.apotheosis.api.SAAItemEmpowered;
  4. import com.malkuthe.apotheosis.items.reference.ItemRepo;
  5. import com.malkuthe.apotheosis.items.reference.SAAItem;
  6. import com.malkuthe.apotheosis.potion.PotionHandler;
  7. import cpw.mods.fml.common.registry.GameRegistry;
  8. import net.minecraft.entity.item.EntityItem;
  9. import net.minecraft.entity.player.EntityPlayer;
  10. import net.minecraft.entity.player.InventoryPlayer;
  11. import net.minecraft.item.ItemStack;
  12. import net.minecraft.potion.PotionEffect;
  13. import net.minecraft.world.World;
  14.  
  15. /**
  16.  * Created by Malkuthe on 6/23/2014.
  17.  */
  18. public class ItemConsumingRage extends SAAItemEmpowered {
  19.  
  20.     public ItemConsumingRage(String name) {
  21.         super(name);
  22.         setEmpoweredItemProperties(true, 1, ItemRepo.item_songs, 2, 40, 45);
  23.     }
  24.  
  25.     @Override
  26.     public void onCreated(ItemStack itemstack, World world, EntityPlayer player){
  27.         super.onCreated(itemstack, world, player);
  28.         if(!world.isRemote){
  29.             player.addPotionEffect(new PotionEffect(PotionHandler.empowerPotion.id, getDurationEmpower()*20 , 0));
  30.         }
  31.     }
  32.  
  33.     public void onUpdate(ItemStack itemstack, World world, EntityPlayer player, int i, boolean j){
  34.         super.onUpdate(itemstack, world, player, i, j);
  35.         System.out.println("onupdate is working?");
  36.     }
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment