Run formatter

This commit is contained in:
Nicholas Ignoffo 2017-08-15 21:30:48 -07:00
parent 61c44a831b
commit 08258fd6ef
606 changed files with 13464 additions and 22975 deletions

View file

@ -1,82 +1,70 @@
package WayofTime.bloodmagic.livingArmour.upgrade;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.livingArmour.ILivingArmour;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.util.helper.TextHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.world.World;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.livingArmour.ILivingArmour;
import WayofTime.bloodmagic.api.livingArmour.LivingArmourUpgrade;
import WayofTime.bloodmagic.util.helper.TextHelper;
public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade
{
public static final int[] costs = new int[] { 2, 6, 14, 25, 40 };
public static final int[] poisonCooldownTime = new int[] { 1200, 800, 600, 300, 100 };
public static final int[] poisonMaxCure = new int[] { 0, 1, 2, 2, 3 };
public class LivingArmourUpgradePoisonResist extends LivingArmourUpgrade {
public static final int[] costs = new int[]{2, 6, 14, 25, 40};
public static final int[] poisonCooldownTime = new int[]{1200, 800, 600, 300, 100};
public static final int[] poisonMaxCure = new int[]{0, 1, 2, 2, 3};
public int poisonCooldown = 0;
public LivingArmourUpgradePoisonResist(int level)
{
public LivingArmourUpgradePoisonResist(int level) {
super(level);
}
@Override
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour)
{
if (player.isPotionActive(MobEffects.POISON) && poisonCooldown <= 0)
{
public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) {
if (player.isPotionActive(MobEffects.POISON) && poisonCooldown <= 0) {
PotionEffect eff = player.getActivePotionEffect(MobEffects.POISON);
if (eff.getAmplifier() <= poisonMaxCure[this.level])
{
if (eff.getAmplifier() <= poisonMaxCure[this.level]) {
player.removePotionEffect(MobEffects.POISON);
poisonCooldown = poisonCooldownTime[this.level];
player.sendStatusMessage(new TextComponentString(TextHelper.localize(chatBase + "poisonRemove")), true);
}
} else if (poisonCooldown > 0)
{
} else if (poisonCooldown > 0) {
poisonCooldown--;
}
}
@Override
public String getUniqueIdentifier()
{
public String getUniqueIdentifier() {
return BloodMagic.MODID + ".upgrade.poisonResist";
}
@Override
public int getMaxTier()
{
public int getMaxTier() {
return 5; // Set to here until I can add more upgrades to it.
}
@Override
public int getCostOfUpgrade()
{
public int getCostOfUpgrade() {
return costs[this.level];
}
@Override
public void writeToNBT(NBTTagCompound tag)
{
public void writeToNBT(NBTTagCompound tag) {
tag.setInteger(Constants.NBT.UPGRADE_POISON_TIMER, poisonCooldown);
}
@Override
public void readFromNBT(NBTTagCompound tag)
{
public void readFromNBT(NBTTagCompound tag) {
poisonCooldown = tag.getInteger(Constants.NBT.UPGRADE_POISON_TIMER);
}
@Override
public String getUnlocalizedName()
{
public String getUnlocalizedName() {
return tooltipBase + "poisonResist";
}
}