diff options
author | Technus <daniel112092@gmail.com> | 2018-04-15 12:35:33 +0200 |
---|---|---|
committer | Technus <daniel112092@gmail.com> | 2018-04-15 12:35:33 +0200 |
commit | a50fe06bfcae07d1bf25af784364392cd232d3cd (patch) | |
tree | 9a8905c62ea4c15102754444f1354845dd3dcf46 /src/main/java/gregtech/api/util/GT_Utility.java | |
parent | 7971edd3771ea2e0687e65151fb9b3bca90d2609 (diff) | |
parent | 2b492f360ad5bd1a2f525d101d8fdfa4628c2552 (diff) | |
download | GT5-Unofficial-a50fe06bfcae07d1bf25af784364392cd232d3cd.tar.gz GT5-Unofficial-a50fe06bfcae07d1bf25af784364392cd232d3cd.tar.bz2 GT5-Unofficial-a50fe06bfcae07d1bf25af784364392cd232d3cd.zip |
Merge branch 'experimental' of https://github.com/GTNewHorizons/GT5-Unofficial into experimental
Diffstat (limited to 'src/main/java/gregtech/api/util/GT_Utility.java')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Utility.java | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index fa7d96d0d6..8a1a7feb3d 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -1940,8 +1940,7 @@ public class GT_Utility { return false; } - public static ArrayList<String> sortByValueToList( Map<String, Integer> map ) - { + public static ArrayList<String> sortByValueToList( Map<String, Integer> map ) { List<Map.Entry<String, Integer>> list = new LinkedList<Map.Entry<String, Integer>>( map.entrySet() ); Collections.sort( list, new Comparator<Map.Entry<String, Integer>>() @@ -2118,8 +2117,9 @@ public class GT_Utility { ArrayList<String> tOilsTransformed = new ArrayList<String>(aOils.size()); for (String aStr : aOils) { String[] aStats = aStr.split(","); - tOilsTransformed.add(aStats[3] + " " + aStats[2] + "L"); + tOilsTransformed.add(aStats[0] + ": " + aStats[1] + "L " + aStats[2]); } + tNBT.setString("prospection_oils", joinListToString(tOilsTransformed)); tNBT.setString("prospection_bounds", aNear + "|" + aMiddle + "|" + aRadius); @@ -2161,7 +2161,7 @@ public class GT_Utility { NBTTagList tNBTList = new NBTTagList(); - String tPageText = "Advanced prospection\n" + String tPageText = "Advanced prospection\n\n" + tPos + "\n" + "Results:\n" + "- Close Range Ores: " + (tNearOres != null ? tNearOres.length : 0) + "\n" @@ -2170,20 +2170,36 @@ public class GT_Utility { + "- Oils: " + (tOils != null ? tOils.length : 0) + "\n\n" + "Lists was sorted by volume"; tNBTList.appendTag(new NBTTagString(tPageText)); - + if (tNearOres != null) fillBookWithList(tNBTList, "Close Range Ores%s\n\n", ", ", 20, tNearOres); if (tMiddleOres != null) fillBookWithList(tNBTList, "Mid Range Ores%s\n\n", ", ", 20, tMiddleOres); if (tFarOres != null) fillBookWithList(tNBTList, "Far Range Ores%s\n\n", ", ", 20, tFarOres); + + tPageText = "Ore notes\n\n" + + "Close range:\nR <= " + tBounds[0] + "\n" + + "Mid range:\n" + tBounds[0] + " < R <= " + tBounds[1] + "\n" + + "Far range:\n" + tBounds[1] + " < R <= " + tBounds[2] + "\n" + + "\n" + + "[F][F][F][F][F]" + "\n" + + "[F][M][M][M][F]" + "\n" + + "[F][M][C][M][F]" + "\n" + + "[F][M][M][M][F]" + "\n" + + "[F][F][F][F][F]"; + tNBTList.appendTag(new NBTTagString(tPageText)); + if (tOils != null) fillBookWithList(tNBTList, "Oils%s\n\n", "\n", 9, tOils); - tPageText = "Notes\n\n" - + "Close range:\nR <= " + tBounds[0] + "\n" - + "Mid range:\n" + tBounds[0] + " < R <= " + tBounds[1] + "\n" - + "Far range:\n" + tBounds[1] + " < R <= " + tBounds[2]; + tPageText = "Oil notes\n\n" + + "Prospects from NW to SE 324 chunks (9 oilfields) around and gives min-max amount" + "\n\n" + + "[1][2][3]" + "\n" + + "[4][5][6]" + "\n" + + "[7][8][9]" + "\n" + + "\n" + + "[5] - Prospector"; tNBTList.appendTag(new NBTTagString(tPageText)); tNBT.setString("author", tPos); |