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

@ -5,28 +5,23 @@ import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
public class GhostItemHelper
{
public static void setItemGhostAmount(ItemStack stack, int amount)
{
public class GhostItemHelper {
public static void setItemGhostAmount(ItemStack stack, int amount) {
NBTHelper.checkNBT(stack);
NBTTagCompound tag = stack.getTagCompound();
tag.setInteger(Constants.NBT.GHOST_STACK_SIZE, amount);
}
public static int getItemGhostAmount(ItemStack stack)
{
public static int getItemGhostAmount(ItemStack stack) {
NBTHelper.checkNBT(stack);
NBTTagCompound tag = stack.getTagCompound();
return tag.getInteger(Constants.NBT.GHOST_STACK_SIZE);
}
public static boolean hasGhostAmount(ItemStack stack)
{
if (!stack.hasTagCompound())
{
public static boolean hasGhostAmount(ItemStack stack) {
if (!stack.hasTagCompound()) {
return false;
}
@ -34,29 +29,25 @@ public class GhostItemHelper
return tag.hasKey(Constants.NBT.GHOST_STACK_SIZE);
}
public static void incrementGhostAmout(ItemStack stack, int value)
{
public static void incrementGhostAmout(ItemStack stack, int value) {
int amount = getItemGhostAmount(stack);
amount += value;
setItemGhostAmount(stack, amount);
}
public static void decrementGhostAmount(ItemStack stack, int value)
{
public static void decrementGhostAmount(ItemStack stack, int value) {
int amount = getItemGhostAmount(stack);
amount -= value;
setItemGhostAmount(stack, amount);
}
public static ItemStack getStackFromGhost(ItemStack ghostStack)
{
public static ItemStack getStackFromGhost(ItemStack ghostStack) {
ItemStack newStack = ghostStack.copy();
NBTHelper.checkNBT(newStack);
NBTTagCompound tag = newStack.getTagCompound();
int amount = getItemGhostAmount(ghostStack);
tag.removeTag(Constants.NBT.GHOST_STACK_SIZE);
if (tag.hasNoTags())
{
if (tag.hasNoTags()) {
newStack.setTagCompound(null);
}
newStack.setCount(amount);