Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.19 KB | None | 0 0
  1. package net.minecraft.src;
  2. import net.minecraft.client.Minecraft;
  3.  
  4. public class EmptySoulGem extends Item
  5. {
  6.  
  7.     protected EmptySoulGem(int i)
  8.     {
  9.         super(i);
  10.         field_21011_a = 100;
  11.         maxStackSize = 1;
  12.     }
  13.  
  14.     public int getDamageVsEntity(Entity entity)
  15.     {
  16.         return field_21011_a;
  17.     }
  18.  
  19.     public void hitEntity(ItemStack itemstack, EntityLiving entityliving)
  20.     {
  21.  
  22.        
  23.         if(entityliving instanceof EntityCreature)
  24.         {
  25.            
  26.             if(entityliving instanceof EntityAnimals)
  27.             {
  28.                 itemstack.itemID = mod_SoulGemsMod.sgm_filled_soulgem.shiftedIndex;
  29.                 ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("You've acquired a Charged Soulgem!");
  30.             }
  31.            
  32.             if(entityliving instanceof EntitySquid)
  33.             {
  34.                 itemstack.itemID = mod_SoulGemsMod.sgm_filled_soulgem.shiftedIndex;
  35.                 ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("You've acquired a Charged Soulgem!");
  36.             }
  37.            
  38.             if(entityliving instanceof EntityZombie)
  39.             {
  40.                 itemstack.itemID = mod_SoulGemsMod.sgm_gemzomb.shiftedIndex;
  41.                 ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("You've captured a Zombie's soul!");
  42.             }
  43.        
  44.             if(entityliving instanceof EntitySkeleton)
  45.             {
  46.                 itemstack.itemID = mod_SoulGemsMod.sgm_gemskelly.shiftedIndex;
  47.                 ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("You've captured a Skeleton's soul!");
  48.             }
  49.        
  50.             if(entityliving instanceof EntitySpider)
  51.             {
  52.                 itemstack.itemID = mod_SoulGemsMod.sgm_gemspida.shiftedIndex;
  53.                 ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("You've captured a Spider's soul!");
  54.             }
  55.            
  56.             if(entityliving instanceof EntityCreeper)
  57.             {
  58.                 itemstack.itemID = mod_SoulGemsMod.sgm_black_soulgem.shiftedIndex;
  59.                 ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("You've acquired a Black Soulgem!");
  60.             }
  61.            
  62.        }
  63.        
  64.     }
  65.    
  66.     private int field_21011_a;
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement