diff --git a/src/main/java/noppes/npcs/NBTTags.java b/src/main/java/noppes/npcs/NBTTags.java index 3624290f2..e356d6cea 100644 --- a/src/main/java/noppes/npcs/NBTTags.java +++ b/src/main/java/noppes/npcs/NBTTags.java @@ -27,7 +27,7 @@ public class NBTTags { } return list; } - + public static ItemStack[] getItemStackArray( NBTTagList tagList) { ItemStack[] list = new ItemStack[tagList.tagCount()]; @@ -38,7 +38,7 @@ public class NBTTags { } return list; } - + public static ArrayList getIntegerArraySet(NBTTagList tagList) { ArrayList set = new ArrayList(); for(int i = 0; i < tagList.tagCount(); i++) @@ -58,7 +58,7 @@ public class NBTTags { } return list; } - + public static HashMap getIntegerIntegerMap( NBTTagList tagList) { HashMap list = new HashMap(); @@ -80,7 +80,7 @@ public class NBTTags { } return list; } - + public static HashMap getIntegerLongMap( NBTTagList tagList) { HashMap list = new HashMap(); @@ -113,7 +113,7 @@ public class NBTTags { } return nbttaglist; } - + public static HashSet getIntegerSet(NBTTagList tagList) { HashSet list = new HashSet(); for(int i = 0; i < tagList.tagCount(); i++) @@ -155,7 +155,7 @@ public class NBTTags { } return list; } - + public static HashMap getStringIntegerMap(NBTTagList tagList) { HashMap list = new HashMap(); for(int i = 0; i < tagList.tagCount(); i++) @@ -165,7 +165,7 @@ public class NBTTags { } return list; } - + public static HashMap getStringIntegerArrayMap(NBTTagList tagList) { HashMap list = new HashMap(); for(int i = 0; i < tagList.tagCount(); i++) @@ -175,7 +175,7 @@ public class NBTTags { } return list; } - + /** * @param tagList * @param arrayLength if an int array is not this length a new int array with this length is made @@ -192,7 +192,7 @@ public class NBTTags { } return list; } - + public static HashMap> getVectorMap(NBTTagList tagList) { HashMap> map = new HashMap>(); for(int i = 0; i < tagList.tagCount(); i++) @@ -205,7 +205,7 @@ public class NBTTags { NBTTagCompound value = list.getCompoundTagAt(j); values.add(value.getString("Value")); } - + map.put(nbttagcompound.getString("Key"), values); } return map; @@ -221,7 +221,7 @@ public class NBTTags { } return list; } - + public static String[] getStringArray(NBTTagList tagList, int size) { String[] arr = new String[size]; for (int i = 0; i < tagList.tagCount(); i++) { @@ -232,7 +232,7 @@ public class NBTTags { } return arr; } - + public static NBTTagList nbtIntegerArraySet(List set) { NBTTagList nbttaglist = new NBTTagList(); if(set == null) @@ -245,7 +245,7 @@ public class NBTTags { } return nbttaglist; } - + public static NBTTagList nbtItemStackList(HashMapinventory) { NBTTagList nbttaglist = new NBTTagList(); if(inventory == null) @@ -259,12 +259,12 @@ public class NBTTags { nbttagcompound.setByte("Slot", (byte)slot); NoppesUtilServer.writeItem(item, nbttagcompound); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; } - + public static NBTTagList nbtItemStackArray(ItemStack[] inventory) { NBTTagList nbttaglist = new NBTTagList(); if(inventory == null) @@ -277,7 +277,7 @@ public class NBTTags { if(item != null) NoppesUtilServer.writeItem(item, nbttagcompound); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; @@ -293,13 +293,13 @@ public class NBTTags { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setInteger("Slot", slot); nbttagcompound.setBoolean("Boolean", inventory2.get(slot)); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; } - public static NBTTagList nbtIntegerIntegerMap(HashMap lines) { + public static NBTTagList nbtIntegerIntegerMap(Map lines) { NBTTagList nbttaglist = new NBTTagList(); if(lines == null) return nbttaglist; @@ -312,7 +312,7 @@ public class NBTTags { return nbttaglist; } - public static NBTTagList nbtIntegerDoubleMap(HashMap lines) { + public static NBTTagList nbtIntegerDoubleMap(Map lines) { NBTTagList nbttaglist = new NBTTagList(); if(lines == null) return nbttaglist; @@ -325,7 +325,7 @@ public class NBTTags { return nbttaglist; } - public static NBTTagList nbtIntegerLongMap(HashMap lines) { + public static NBTTagList nbtIntegerLongMap(Map lines) { NBTTagList nbttaglist = new NBTTagList(); if(lines == null) return nbttaglist; @@ -338,7 +338,7 @@ public class NBTTags { return nbttaglist; } - public static NBTTagList nbtVectorMap(HashMap> map) { + public static NBTTagList nbtVectorMap(Map> map) { NBTTagList list = new NBTTagList(); if(map == null) return list; @@ -356,8 +356,8 @@ public class NBTTags { } return list; } - - public static NBTTagList nbtStringStringMap(HashMap map) { + + public static NBTTagList nbtStringStringMap(Map map) { NBTTagList nbttaglist = new NBTTagList(); if(map == null) return nbttaglist; @@ -366,13 +366,13 @@ public class NBTTags { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setString("Slot", slot); nbttagcompound.setString("Value", map.get(slot)); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; } - - public static NBTTagList nbtStringIntegerMap(HashMap map) { + + public static NBTTagList nbtStringIntegerMap(Map map) { NBTTagList nbttaglist = new NBTTagList(); if(map == null) return nbttaglist; @@ -381,13 +381,13 @@ public class NBTTags { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setString("Slot", slot); nbttagcompound.setInteger("Value", map.get(slot)); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; } - - public static NBTTagList nbtStringIntegerArrayMap(HashMap map) { + + public static NBTTagList nbtStringIntegerArrayMap(Map map) { NBTTagList nbttaglist = new NBTTagList(); if(map == null) return nbttaglist; @@ -396,7 +396,7 @@ public class NBTTags { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setString("Slot", slot); nbttagcompound.setIntArray("Value", map.get(slot)); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; @@ -411,17 +411,17 @@ public class NBTTags { NBTTagCompound nbttagcompound = new NBTTagCompound(); nbttagcompound.setInteger("Slot", slot); nbttagcompound.setString("Value", map.get(slot)); - + nbttaglist.appendTag(nbttagcompound); } return nbttaglist; } - + public static NBTTagList nbtStringArray(String[] list) { NBTTagList nbttaglist = new NBTTagList(); if(list == null) return nbttaglist; - for(int i = 0; i < list.length; i++){ + for(int i = 0; i < list.length; i++){ if(list[i] == null) continue; NBTTagCompound nbttagcompound = new NBTTagCompound(); @@ -431,7 +431,7 @@ public class NBTTags { } return nbttaglist; } - + public static NBTTagList nbtStringList(List list) { NBTTagList nbttaglist = new NBTTagList(); for (String s : list) {