Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.61 KB | None | 0 0
  1.     public boolean onItemUse(ItemStack itemstack, EntityPlayer player, World world, int x, int y, int z, int meta, float p_77648_8_, float p_77648_9_, float p_77648_10_)
  2.     {
  3.         if (!player.canPlayerEdit(x, y, z, meta, itemstack))
  4.         {
  5.             return false;
  6.         }
  7.         else
  8.         {
  9.             //Aquarius
  10.             if (itemstack.getItemDamage() == 1 && !world.isRemote)
  11.             {
  12.                 spiritCost = (int)((player.experienceLevel) / 7);
  13.                 if ( (player.experienceTotal > spiritCost) && spiritCost >= 9 ) // Base Value
  14.                 {
  15.                     EntityAquarius par1 = new EntityAquarius(world);
  16.                     par1.setPosition(player.posX, player.posY+1,player.posZ-2);
  17.                     par1.func_152115_b(player.getUniqueID().toString());
  18.                     world.spawnEntityInWorld(par1);
  19.                     world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
  20.                     player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Aquarius! I summon you!"));
  21.                     player.addExperienceLevel((int)-spiritCost);
  22.                 }else{
  23.                     player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
  24.                 }          
  25.             }
  26.            
  27.             //Taurus
  28.             if (itemstack.getItemDamage() == 2 && !world.isRemote)
  29.             {
  30.                 spiritCost = (int)((player.experienceLevel) / 9);
  31.                 if ( (player.experienceTotal > spiritCost) && spiritCost >= 11 ) // Base Value
  32.                 {
  33.                     EntityTaurus par1 = new EntityTaurus(world);
  34.                     par1.setPosition(player.posX, player.posY+1,player.posZ-2);
  35.                     par1.func_152115_b(player.getUniqueID().toString());
  36.                     world.spawnEntityInWorld(par1);
  37.                     world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
  38.                     player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Taurus! I summon you!"));
  39.                     player.addExperienceLevel((int)-spiritCost);
  40.                 }else{
  41.                     player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
  42.                 }          
  43.             }
  44.            
  45.             //Cancer
  46.             if (itemstack.getItemDamage() == 3 && !world.isRemote)
  47.             {
  48.                 spiritCost = (int)((player.experienceLevel) / 9);
  49.                 if ( (player.experienceTotal > spiritCost) && spiritCost >= 11 ) // Base Value
  50.                 {
  51.                     EntityCancer par1 = new EntityCancer(world);
  52.                     par1.setPosition(player.posX, player.posY+1,player.posZ-2);
  53.                     par1.func_152115_b(player.getUniqueID().toString());
  54.                     world.spawnEntityInWorld(par1);
  55.                     world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
  56.                     player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Cancer! I summon you!"));
  57.                     player.addExperienceLevel((int)-spiritCost);
  58.                 }else{
  59.                     player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
  60.                 }          
  61.             }
  62.            
  63.             if (itemstack.getItemDamage() == 6 && !world.isRemote)
  64.             {
  65.                 spiritCost = (int)((player.experienceLevel) / 12);
  66.                 if ( (player.experienceTotal > spiritCost) && spiritCost >= 14 ) // Base Value
  67.                 {
  68.                     EntityAries par1 = new EntityAries(world);
  69.                     par1.setPosition(player.posX, player.posY+1,player.posZ-2);
  70.                     par1.func_152115_b(player.getUniqueID().toString());
  71.                     world.spawnEntityInWorld(par1);
  72.                     world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
  73.                     player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Aries! I summon you!"));
  74.                     player.addExperienceLevel((int)-spiritCost);
  75.                 }else{
  76.                     player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
  77.                 }          
  78.             }
  79.             else if (itemstack.getItemDamage() == 3)
  80.             {
  81.  
  82.             }
  83.  
  84.             return false;
  85.         }
  86.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement