diff options
| author | Alkalus <draknyte1@hotmail.com> | 2017-11-14 23:34:28 +1000 |
|---|---|---|
| committer | Alkalus <draknyte1@hotmail.com> | 2017-11-14 23:34:28 +1000 |
| commit | 390ac495e051df79017840504912adda10b04584 (patch) | |
| tree | 9244c2d2f3af66250dd21a9258c5c7afa8835921 /src/Java/gtPlusPlus/core/util/nbt | |
| parent | 9ca3689c05efa82a4b5efe3f8d3b6013ebd54cd5 (diff) | |
| download | GT5-Unofficial-390ac495e051df79017840504912adda10b04584.tar.gz GT5-Unofficial-390ac495e051df79017840504912adda10b04584.tar.bz2 GT5-Unofficial-390ac495e051df79017840504912adda10b04584.zip | |
% Formatting changes.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/nbt')
| -rw-r--r-- | src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java | 2 | ||||
| -rw-r--r-- | src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java | 48 |
2 files changed, 24 insertions, 26 deletions
diff --git a/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java b/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java index 81981bbac5..5d9da4da1e 100644 --- a/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java +++ b/src/Java/gtPlusPlus/core/util/nbt/ModularArmourUtils.java @@ -4,8 +4,6 @@ import baubles.api.BaubleType; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.array.Pair; -import gtPlusPlus.core.util.nbt.ModularArmourUtils.Modifiers; -import net.minecraft.block.Block.SoundType; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; diff --git a/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java b/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java index c5f3942997..817dc9807f 100644 --- a/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java +++ b/src/Java/gtPlusPlus/core/util/nbt/NBTUtils.java @@ -206,7 +206,7 @@ public class NBTUtils { NBTTagCompound aNBT = NBTUtils.getNBT(aStack); if (aNBT != null) { if (!aNBT.hasNoTags()) { - int tagCount = 0; + // int tagCount = 0; Map<?, ?> mInternalMap = ReflectionUtils.getField(aNBT, "tagMap"); if (mInternalMap != null) { @@ -250,44 +250,44 @@ public class NBTUtils { return tNBT.getString(TAG_SOULBIND); } - public static boolean hasKey(ItemStack stack, String key){ - if (stack.hasTagCompound()) { + public static boolean hasKey(ItemStack stack, String key) { + if (stack.hasTagCompound()) { final NBTTagCompound itemData = stack.getTagCompound(); - if (itemData.hasKey(key)){ + if (itemData.hasKey(key)) { return true; } } return false; } - - public static boolean createIntegerTagCompound(ItemStack rStack, String tagName, String keyName, int keyValue){ + + public static boolean createIntegerTagCompound(ItemStack rStack, String tagName, String keyName, int keyValue) { final NBTTagCompound tagMain = new NBTTagCompound(); final NBTTagCompound tagNBT = new NBTTagCompound(); tagNBT.setInteger(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); return true; } - - public static boolean createLongTagCompound(ItemStack rStack, String tagName, String keyName, long keyValue){ + + public static boolean createLongTagCompound(ItemStack rStack, String tagName, String keyName, long keyValue) { final NBTTagCompound tagMain = new NBTTagCompound(); final NBTTagCompound tagNBT = new NBTTagCompound(); tagNBT.setLong(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); return true; } - - public static boolean createStringTagCompound(ItemStack rStack, String tagName, String keyName, String keyValue){ + + public static boolean createStringTagCompound(ItemStack rStack, String tagName, String keyName, String keyValue) { final NBTTagCompound tagMain = new NBTTagCompound(); final NBTTagCompound tagNBT = new NBTTagCompound(); tagNBT.setString(keyName, keyValue); - tagMain.setTag(tagName, tagNBT); - rStack.setTagCompound(tagMain); + tagMain.setTag(tagName, tagNBT); + rStack.setTagCompound(tagMain); return true; } - - public static int getIntegerTagCompound(ItemStack aStack, String tagName, String keyName){ + + public static int getIntegerTagCompound(ItemStack aStack, String tagName, String keyName) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag(tagName); @@ -297,8 +297,8 @@ public class NBTUtils { } return 0; } - - public static long getLongTagCompound(ItemStack aStack, String tagName, String keyName){ + + public static long getLongTagCompound(ItemStack aStack, String tagName, String keyName) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag(tagName); @@ -308,8 +308,8 @@ public class NBTUtils { } return 0L; } - - public static String getStringTagCompound(ItemStack aStack, String tagName, String keyName){ + + public static String getStringTagCompound(ItemStack aStack, String tagName, String keyName) { NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag(tagName); @@ -319,8 +319,8 @@ public class NBTUtils { } return null; } - - public static boolean hasKeyInTagCompound(ItemStack stack, String tag, String key){ + + public static boolean hasKeyInTagCompound(ItemStack stack, String tag, String key) { NBTTagCompound aNBT = stack.getTagCompound(); if (aNBT != null) { aNBT = aNBT.getCompoundTag(tag); |
