/* * Decompiled with CFR 0.152. * * Could not load the following classes: * mods.flammpfeil.slashblade.ItemSlashBlade * mods.flammpfeil.slashblade.ItemSlashBlade$ComboSequence * mods.flammpfeil.slashblade.ability.StylishRankManager * mods.flammpfeil.slashblade.ability.StylishRankManager$AttackTypes * mods.flammpfeil.slashblade.specialattack.SpecialAttackBase * net.minecraft.enchantment.Enchantment * net.minecraft.enchantment.EnchantmentHelper * net.minecraft.entity.Entity * net.minecraft.entity.EntityLivingBase * net.minecraft.entity.player.EntityPlayer * net.minecraft.item.ItemStack * net.minecraft.nbt.NBTTagCompound * net.minecraft.world.World */ package Zxsa.mods.zxsa.specialattack; import Zxsa.mods.zxsa.entity.EntityAquaEdge; import mods.flammpfeil.slashblade.ItemSlashBlade; import mods.flammpfeil.slashblade.ability.StylishRankManager; import mods.flammpfeil.slashblade.specialattack.SpecialAttackBase; import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.EnchantmentHelper; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; public class Not2_SA extends SpecialAttackBase { public static String AttackType = StylishRankManager.AttackTypes.registerAttackType((String)"Not2_SA", (float)0.5f); public String toString() { return "not2_sa"; } public void doSpacialAttack(ItemStack stack, EntityPlayer player) { World world = player.worldObj; NBTTagCompound tag = ItemSlashBlade.getItemTagCompound((ItemStack)stack); player.playSound("fire.fire", 1.0f, 1.5f); for (int i = 0; i < 50; ++i) { double d0 = player.getRNG().nextGaussian() * 0.02; double d1 = player.getRNG().nextGaussian() * 0.02; double d2 = player.getRNG().nextGaussian() * 0.02; double d3 = 10.0; player.worldObj.spawnParticle("flame", player.posX + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d0 * d3) * 2.0, player.posY, player.posZ + ((double)(player.getRNG().nextFloat() * player.width * 2.0f - player.width) - d2 * d3) * 2.0, d0, d1, d2); } if (player.isBurning()) { player.playSound("random.fizz", 0.7f, 1.6f + (player.getRNG().nextFloat() - player.getRNG().nextFloat()) * 0.4f); player.extinguish(); } if (!world.isRemote) { int cost = -20; if (!ItemSlashBlade.ProudSoul.tryAdd(tag, Integer.valueOf(cost), false)) { stack.damageItem(10, (EntityLivingBase)player); } ItemSlashBlade blade = (ItemSlashBlade)stack.getItem(); float baseModif = blade.getBaseAttackModifiers(tag); int level = Math.max(1, EnchantmentHelper.getEnchantmentLevel((int)Enchantment.power.effectId, (ItemStack)stack)); float magicDamage = baseModif * 1.5f; int rank = StylishRankManager.getStylishRank((Entity)player); if (5 <= rank) { magicDamage += ItemSlashBlade.AttackAmplifier.get(tag).floatValue() * (2.2f + (float)level / 2.0f); } if (7 <= rank) { magicDamage *= 2.0f; } int maxCol = 3; int maxCount = 3; double radBaseRot = Math.toRadians(player.rotationYaw); double radRot = Math.PI * 2 / (double)(maxCount += rank / 4 * 3); for (int j = 0; j < maxCol; ++j) { for (int i = 0; i < maxCount; ++i) { EntityAquaEdge entityDrive; if (world.isRemote || (entityDrive = new EntityAquaEdge(world, (EntityLivingBase)player, magicDamage, false, 0.0f)) == null) continue; entityDrive.setLocationAndAngles(player.posX, player.posY + (double)player.getEyeHeight() / 2.0, player.posZ, player.rotationYaw + (float)(15 * ((int)Math.floor(maxCount / 2) + 1 - i)), player.rotationPitch); entityDrive.setColor(255); entityDrive.setDriveVector(1.2f + (float)(j * 2 / 5)); entityDrive.setIsMultiHit(true); entityDrive.setLifeTime(50); entityDrive.setRoll(0.0f); entityDrive.setSpeedByTimeEvent(0.1f, 1.05f, 10 + j * 4 + i); entityDrive.setParticle("flame"); entityDrive.setSound("fire.fire"); world.spawnEntityInWorld((Entity)entityDrive); } } } ItemSlashBlade.setComboSequence((NBTTagCompound)tag, (ItemSlashBlade.ComboSequence)ItemSlashBlade.ComboSequence.Battou); } }