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

@ -9,7 +9,6 @@ import WayofTime.bloodmagic.client.IVariantProvider;
import WayofTime.bloodmagic.util.helper.TextHelper;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@ -17,19 +16,16 @@ import net.minecraft.util.NonNullList;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import java.util.ArrayList;
import java.util.List;
public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvider
{
public static String[] names = { "base", "corrosive", "destructive", "vengeful", "steadfast" };
public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvider {
public static String[] names = {"base", "corrosive", "destructive", "vengeful", "steadfast"};
public ItemMonsterSoul()
{
public ItemMonsterSoul() {
super();
setUnlocalizedName(BloodMagic.MODID + ".monsterSoul.");
@ -39,14 +35,12 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
}
@Override
public String getUnlocalizedName(ItemStack stack)
{
public String getUnlocalizedName(ItemStack stack) {
return super.getUnlocalizedName(stack) + names[stack.getItemDamage()];
}
@Override
public void getSubItems(CreativeTabs creativeTab, NonNullList<ItemStack> list)
{
public void getSubItems(CreativeTabs creativeTab, NonNullList<ItemStack> list) {
if (!isInCreativeTab(creativeTab))
return;
@ -56,8 +50,7 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag)
{
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
if (!stack.hasTagCompound())
return;
tooltip.add(TextHelper.localize("tooltip.bloodmagic.will", getWill(getType(stack), stack)));
@ -66,16 +59,13 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
}
@Override
public EnumDemonWillType getType(ItemStack stack)
{
public EnumDemonWillType getType(ItemStack stack) {
return EnumDemonWillType.values()[stack.getItemDamage() % 5];
}
@Override
public double getWill(EnumDemonWillType type, ItemStack soulStack)
{
if (type != this.getType(soulStack))
{
public double getWill(EnumDemonWillType type, ItemStack soulStack) {
if (type != this.getType(soulStack)) {
return 0;
}
@ -87,8 +77,7 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
}
@Override
public void setWill(EnumDemonWillType type, ItemStack soulStack, double souls)
{
public void setWill(EnumDemonWillType type, ItemStack soulStack, double souls) {
NBTHelper.checkNBT(soulStack);
NBTTagCompound tag = soulStack.getTagCompound();
@ -99,8 +88,7 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
}
@Override
public double drainWill(EnumDemonWillType type, ItemStack soulStack, double drainAmount)
{
public double drainWill(EnumDemonWillType type, ItemStack soulStack, double drainAmount) {
double souls = getWill(type, soulStack);
double soulsDrained = Math.min(drainAmount, souls);
@ -110,19 +98,16 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
}
@Override
public ItemStack createWill(int meta, double number)
{
public ItemStack createWill(int meta, double number) {
ItemStack soulStack = new ItemStack(this, 1, meta % 5);
setWill(getType(soulStack), soulStack, number);
return soulStack;
}
@Override
public List<Pair<Integer, String>> getVariants()
{
public List<Pair<Integer, String>> getVariants() {
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
for (int i = 0; i < names.length; i++)
{
for (int i = 0; i < names.length; i++) {
String name = names[i];
ret.add(new ImmutablePair<Integer, String>(i, "type=" + name));
}
@ -130,20 +115,17 @@ public class ItemMonsterSoul extends Item implements IDemonWill, IVariantProvide
}
@Override
public double getWill(ItemStack willStack)
{
public double getWill(ItemStack willStack) {
return this.getWill(EnumDemonWillType.DEFAULT, willStack);
}
@Override
public void setWill(ItemStack willStack, double will)
{
public void setWill(ItemStack willStack, double will) {
this.setWill(EnumDemonWillType.DEFAULT, willStack, will);
}
@Override
public double drainWill(ItemStack willStack, double drainAmount)
{
public double drainWill(ItemStack willStack, double drainAmount) {
return this.drainWill(EnumDemonWillType.DEFAULT, willStack, drainAmount);
}
}