summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
diff options
context:
space:
mode:
authorbculkin2442 <bjculkin@mix.wvu.edu>2018-05-24 16:03:42 -0400
committerbculkin2442 <bjculkin@mix.wvu.edu>2018-05-24 16:03:42 -0400
commit9a4d1e95ea7784f0f98ea2913701a3a3c28aefaa (patch)
treeb4307f58fe2197d2215707bb3f44cf8952229c6d /src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
parent4f7ad220df0438b6f3382110577b53f29da46453 (diff)
Formatting pass
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java')
-rwxr-xr-xsrc/main/java/darkknight/jewelrycraft/client/JewelryInventory.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java b/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
index 6baf8ad..6571634 100755
--- a/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
+++ b/src/main/java/darkknight/jewelrycraft/client/JewelryInventory.java
@@ -20,11 +20,11 @@ public class JewelryInventory implements IInventory {
*/
public JewelryInventory(EntityPlayer player) {
this.player = player;
- NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player,
- Variables.MODID);
+ NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(
+ player, Variables.MODID);
for (int i = 0; i < 18; i++)
- inventory[i] = ItemStack
- .loadItemStackFromNBT(nbt.getCompoundTag("ext" + i));
+ inventory[i] = ItemStack.loadItemStackFromNBT(
+ nbt.getCompoundTag("ext" + i));
}
/**
@@ -79,7 +79,8 @@ public class JewelryInventory implements IInventory {
@Override
public void setInventorySlotContents(int slot, ItemStack stack) {
inventory[slot] = stack;
- if (stack != null && stack.stackSize > getInventoryStackLimit())
+ if (stack != null
+ && stack.stackSize > getInventoryStackLimit())
stack.stackSize = getInventoryStackLimit();
markDirty();
}
@@ -113,12 +114,13 @@ public class JewelryInventory implements IInventory {
*/
@Override
public void markDirty() {
- NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(player,
- Variables.MODID);
+ NBTTagCompound nbt = PlayerUtils.getModPlayerPersistTag(
+ player, Variables.MODID);
for (int i = 0; i < 18; i++)
if (inventory[i] != null)
nbt.setTag("ext" + i, inventory[i]
- .writeToNBT(nbt.getCompoundTag("ext" + i)));
+ .writeToNBT(nbt.getCompoundTag(
+ "ext" + i)));
else
nbt.removeTag("ext" + i);
}
@@ -155,7 +157,8 @@ public class JewelryInventory implements IInventory {
*/
@Override
public boolean isItemValidForSlot(int slot, ItemStack stack) {
- if (slot >= 0 && slot <= 9 && stack.getItem() instanceof ItemRing)
+ if (slot >= 0 && slot <= 9
+ && stack.getItem() instanceof ItemRing)
return true;
else if (slot >= 10 && slot <= 13
&& stack.getItem() instanceof ItemBracelet)
@@ -163,7 +166,8 @@ public class JewelryInventory implements IInventory {
else if (slot >= 14 && slot <= 16
&& stack.getItem() instanceof ItemNecklace)
return true;
- else if (slot == 17 && stack.getItem() instanceof ItemEarrings)
+ else if (slot == 17
+ && stack.getItem() instanceof ItemEarrings)
return true;
return false;
}