Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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_)
- {
- if (!player.canPlayerEdit(x, y, z, meta, itemstack))
- {
- return false;
- }
- else
- {
- //Aquarius
- if (itemstack.getItemDamage() == 1 && !world.isRemote)
- {
- spiritCost = (int)((player.experienceLevel) / 7);
- if ( (player.experienceTotal > spiritCost) && spiritCost >= 9 ) // Base Value
- {
- EntityAquarius par1 = new EntityAquarius(world);
- par1.setPosition(player.posX, player.posY+1,player.posZ-2);
- par1.func_152115_b(player.getUniqueID().toString());
- world.spawnEntityInWorld(par1);
- world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
- player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Aquarius! I summon you!"));
- player.addExperienceLevel((int)-spiritCost);
- }else{
- player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
- }
- }
- //Taurus
- if (itemstack.getItemDamage() == 2 && !world.isRemote)
- {
- spiritCost = (int)((player.experienceLevel) / 9);
- if ( (player.experienceTotal > spiritCost) && spiritCost >= 11 ) // Base Value
- {
- EntityTaurus par1 = new EntityTaurus(world);
- par1.setPosition(player.posX, player.posY+1,player.posZ-2);
- par1.func_152115_b(player.getUniqueID().toString());
- world.spawnEntityInWorld(par1);
- world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
- player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Taurus! I summon you!"));
- player.addExperienceLevel((int)-spiritCost);
- }else{
- player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
- }
- }
- //Cancer
- if (itemstack.getItemDamage() == 3 && !world.isRemote)
- {
- spiritCost = (int)((player.experienceLevel) / 9);
- if ( (player.experienceTotal > spiritCost) && spiritCost >= 11 ) // Base Value
- {
- EntityCancer par1 = new EntityCancer(world);
- par1.setPosition(player.posX, player.posY+1,player.posZ-2);
- par1.func_152115_b(player.getUniqueID().toString());
- world.spawnEntityInWorld(par1);
- world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
- player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Cancer! I summon you!"));
- player.addExperienceLevel((int)-spiritCost);
- }else{
- player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
- }
- }
- if (itemstack.getItemDamage() == 6 && !world.isRemote)
- {
- spiritCost = (int)((player.experienceLevel) / 12);
- if ( (player.experienceTotal > spiritCost) && spiritCost >= 14 ) // Base Value
- {
- EntityAries par1 = new EntityAries(world);
- par1.setPosition(player.posX, player.posY+1,player.posZ-2);
- par1.func_152115_b(player.getUniqueID().toString());
- world.spawnEntityInWorld(par1);
- world.playSoundAtEntity(player, RefStrings.MODID + ":summon-bell", 0.7F, 1.0F);
- player.addChatComponentMessage(new ChatComponentTranslation ("Come forth Aries! I summon you!"));
- player.addExperienceLevel((int)-spiritCost);
- }else{
- player.addChatComponentMessage(new ChatComponentTranslation ("\u00A74You do not have enough Celestial Power!"));
- }
- }
- else if (itemstack.getItemDamage() == 3)
- {
- }
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement