From d04771c7ef5cdab9554aa6aef506a39c8e2bd3d4 Mon Sep 17 00:00:00 2001 From: Moulberry Date: Wed, 22 Jul 2020 03:54:59 +1000 Subject: less scuffed profile viewer :) --- .../moulberry/notenoughupdates/GuiItemRecipe.java | 2 +- .../moulberry/notenoughupdates/NEUManager.java | 2 - .../moulberry/notenoughupdates/NEUOverlay.java | 22 +- .../notenoughupdates/NotEnoughUpdates.java | 29 +- .../notenoughupdates/auction/APIManager.java | 8 +- .../notenoughupdates/auction/CustomAH.java | 2 +- .../profileviewer/GuiProfileViewer.java | 482 ++++++++++++++++----- .../notenoughupdates/profileviewer/Panorama.java | 151 +++++++ .../profileviewer/PlayerStats.java | 27 +- .../profileviewer/ProfileViewer.java | 206 +++++++-- .../notenoughupdates/questing/NEUQuesting.java | 67 --- .../questing/SBScoreboardData.java | 76 ++++ .../questing/requirements/RequirementApi.java | 2 - .../requirements/RequirementIslandType.java | 4 +- .../notenoughupdates/util/HypixelApi.java | 30 +- .../moulberry/notenoughupdates/util/Utils.java | 89 ++++ .../panoramas/combat_1_day/panorama_0.png | Bin 0 -> 2044572 bytes .../panoramas/combat_1_day/panorama_1.png | Bin 0 -> 2118694 bytes .../panoramas/combat_1_day/panorama_2.png | Bin 0 -> 1975377 bytes .../panoramas/combat_1_day/panorama_3.png | Bin 0 -> 1909797 bytes .../panoramas/combat_1_day/panorama_4.png | Bin 0 -> 2256091 bytes .../panoramas/combat_1_day/panorama_5.png | Bin 0 -> 1456745 bytes .../panoramas/combat_1_night/panorama_0.png | Bin 0 -> 1835538 bytes .../panoramas/combat_1_night/panorama_1.png | Bin 0 -> 1892728 bytes .../panoramas/combat_1_night/panorama_2.png | Bin 0 -> 1577765 bytes .../panoramas/combat_1_night/panorama_3.png | Bin 0 -> 1635925 bytes .../panoramas/combat_1_night/panorama_4.png | Bin 0 -> 1873550 bytes .../panoramas/combat_1_night/panorama_5.png | Bin 0 -> 1471032 bytes .../panoramas/combat_2_day/panorama_0.png | Bin 0 -> 1870077 bytes .../panoramas/combat_2_day/panorama_1.png | Bin 0 -> 1827993 bytes .../panoramas/combat_2_day/panorama_2.png | Bin 0 -> 1930272 bytes .../panoramas/combat_2_day/panorama_3.png | Bin 0 -> 2036129 bytes .../panoramas/combat_2_day/panorama_4.png | Bin 0 -> 1741259 bytes .../panoramas/combat_2_day/panorama_5.png | Bin 0 -> 1450149 bytes .../panoramas/combat_2_night/panorama_0.png | Bin 0 -> 1604404 bytes .../panoramas/combat_2_night/panorama_1.png | Bin 0 -> 1506039 bytes .../panoramas/combat_2_night/panorama_2.png | Bin 0 -> 1280422 bytes .../panoramas/combat_2_night/panorama_3.png | Bin 0 -> 1683043 bytes .../panoramas/combat_2_night/panorama_4.png | Bin 0 -> 1475680 bytes .../panoramas/combat_2_night/panorama_5.png | Bin 0 -> 1317441 bytes .../panoramas/combat_3_day/panorama_0.png | Bin 0 -> 2188059 bytes .../panoramas/combat_3_day/panorama_1.png | Bin 0 -> 1858211 bytes .../panoramas/combat_3_day/panorama_2.png | Bin 0 -> 1820033 bytes .../panoramas/combat_3_day/panorama_3.png | Bin 0 -> 2320903 bytes .../panoramas/combat_3_day/panorama_4.png | Bin 0 -> 1815303 bytes .../panoramas/combat_3_day/panorama_5.png | Bin 0 -> 1584572 bytes .../panoramas/combat_3_night/panorama_0.png | Bin 0 -> 1850016 bytes .../panoramas/combat_3_night/panorama_1.png | Bin 0 -> 1491122 bytes .../panoramas/combat_3_night/panorama_2.png | Bin 0 -> 1560123 bytes .../panoramas/combat_3_night/panorama_3.png | Bin 0 -> 1905445 bytes .../panoramas/combat_3_night/panorama_4.png | Bin 0 -> 1618932 bytes .../panoramas/combat_3_night/panorama_5.png | Bin 0 -> 1402137 bytes .../panoramas/dark_auction/panorama_0.png | Bin 0 -> 1855519 bytes .../panoramas/dark_auction/panorama_1.png | Bin 0 -> 1850637 bytes .../panoramas/dark_auction/panorama_2.png | Bin 0 -> 1674606 bytes .../panoramas/dark_auction/panorama_3.png | Bin 0 -> 1922696 bytes .../panoramas/dark_auction/panorama_4.png | Bin 0 -> 2052381 bytes .../panoramas/dark_auction/panorama_5.png | Bin 0 -> 1347015 bytes .../panoramas/dungeon/panorama_0.png | Bin 0 -> 1529623 bytes .../panoramas/dungeon/panorama_1.png | Bin 0 -> 1752770 bytes .../panoramas/dungeon/panorama_2.png | Bin 0 -> 1650468 bytes .../panoramas/dungeon/panorama_3.png | Bin 0 -> 1648713 bytes .../panoramas/dungeon/panorama_4.png | Bin 0 -> 1862221 bytes .../panoramas/dungeon/panorama_5.png | Bin 0 -> 1351481 bytes .../panoramas/dungeon_hub/panorama_0.png | Bin 0 -> 1529623 bytes .../panoramas/dungeon_hub/panorama_1.png | Bin 0 -> 1752770 bytes .../panoramas/dungeon_hub/panorama_2.png | Bin 0 -> 1650468 bytes .../panoramas/dungeon_hub/panorama_3.png | Bin 0 -> 1648713 bytes .../panoramas/dungeon_hub/panorama_4.png | Bin 0 -> 1862221 bytes .../panoramas/dungeon_hub/panorama_5.png | Bin 0 -> 1351481 bytes .../panoramas/dynamic_day/panorama_0.png | Bin 0 -> 2225270 bytes .../panoramas/dynamic_day/panorama_1.png | Bin 0 -> 2261346 bytes .../panoramas/dynamic_day/panorama_2.png | Bin 0 -> 2339782 bytes .../panoramas/dynamic_day/panorama_3.png | Bin 0 -> 2543434 bytes .../panoramas/dynamic_day/panorama_4.png | Bin 0 -> 2173289 bytes .../panoramas/dynamic_day/panorama_5.png | Bin 0 -> 1726308 bytes .../panoramas/dynamic_night/panorama_0.png | Bin 0 -> 2197444 bytes .../panoramas/dynamic_night/panorama_1.png | Bin 0 -> 2394932 bytes .../panoramas/dynamic_night/panorama_2.png | Bin 0 -> 2188571 bytes .../panoramas/dynamic_night/panorama_3.png | Bin 0 -> 2376290 bytes .../panoramas/dynamic_night/panorama_4.png | Bin 0 -> 2000878 bytes .../panoramas/dynamic_night/panorama_5.png | Bin 0 -> 1511540 bytes .../panoramas/farming_1_day/panorama_0.png | Bin 0 -> 2187588 bytes .../panoramas/farming_1_day/panorama_1.png | Bin 0 -> 2459529 bytes .../panoramas/farming_1_day/panorama_2.png | Bin 0 -> 2459437 bytes .../panoramas/farming_1_day/panorama_3.png | Bin 0 -> 2435508 bytes .../panoramas/farming_1_day/panorama_4.png | Bin 0 -> 1669131 bytes .../panoramas/farming_1_day/panorama_5.png | Bin 0 -> 2298029 bytes .../panoramas/farming_1_night/panorama_0.png | Bin 0 -> 1853632 bytes .../panoramas/farming_1_night/panorama_1.png | Bin 0 -> 2028666 bytes .../panoramas/farming_1_night/panorama_2.png | Bin 0 -> 2027933 bytes .../panoramas/farming_1_night/panorama_3.png | Bin 0 -> 1999075 bytes .../panoramas/farming_1_night/panorama_4.png | Bin 0 -> 1466349 bytes .../panoramas/farming_1_night/panorama_5.png | Bin 0 -> 1835107 bytes .../panoramas/farming_2_day/panorama_0.png | Bin 0 -> 2063170 bytes .../panoramas/farming_2_day/panorama_1.png | Bin 0 -> 2017820 bytes .../panoramas/farming_2_day/panorama_2.png | Bin 0 -> 2004712 bytes .../panoramas/farming_2_day/panorama_3.png | Bin 0 -> 2049201 bytes .../panoramas/farming_2_day/panorama_4.png | Bin 0 -> 1505669 bytes .../panoramas/farming_2_day/panorama_5.png | Bin 0 -> 1678571 bytes .../panoramas/farming_2_night/panorama_0.png | Bin 0 -> 1767456 bytes .../panoramas/farming_2_night/panorama_1.png | Bin 0 -> 1690021 bytes .../panoramas/farming_2_night/panorama_2.png | Bin 0 -> 1637647 bytes .../panoramas/farming_2_night/panorama_3.png | Bin 0 -> 1695396 bytes .../panoramas/farming_2_night/panorama_4.png | Bin 0 -> 1347288 bytes .../panoramas/farming_2_night/panorama_5.png | Bin 0 -> 1523433 bytes .../panoramas/foraging_1_day/panorama_0.png | Bin 0 -> 2411778 bytes .../panoramas/foraging_1_day/panorama_1.png | Bin 0 -> 2041133 bytes .../panoramas/foraging_1_day/panorama_2.png | Bin 0 -> 2206230 bytes .../panoramas/foraging_1_day/panorama_3.png | Bin 0 -> 2247037 bytes .../panoramas/foraging_1_day/panorama_4.png | Bin 0 -> 2095796 bytes .../panoramas/foraging_1_day/panorama_5.png | Bin 0 -> 1839740 bytes .../panoramas/foraging_1_night/panorama_0.png | Bin 0 -> 1766471 bytes .../panoramas/foraging_1_night/panorama_1.png | Bin 0 -> 1638095 bytes .../panoramas/foraging_1_night/panorama_2.png | Bin 0 -> 1776122 bytes .../panoramas/foraging_1_night/panorama_3.png | Bin 0 -> 1796200 bytes .../panoramas/foraging_1_night/panorama_4.png | Bin 0 -> 1635702 bytes .../panoramas/foraging_1_night/panorama_5.png | Bin 0 -> 1504163 bytes .../panoramas/hub_day/panorama_0.png | Bin 0 -> 1778138 bytes .../panoramas/hub_day/panorama_1.png | Bin 0 -> 1844566 bytes .../panoramas/hub_day/panorama_2.png | Bin 0 -> 1906390 bytes .../panoramas/hub_day/panorama_3.png | Bin 0 -> 1978044 bytes .../panoramas/hub_day/panorama_4.png | Bin 0 -> 1457085 bytes .../panoramas/hub_day/panorama_5.png | Bin 0 -> 1481400 bytes .../panoramas/hub_night/panorama_0.png | Bin 0 -> 1800967 bytes .../panoramas/hub_night/panorama_1.png | Bin 0 -> 1795725 bytes .../panoramas/hub_night/panorama_2.png | Bin 0 -> 1783854 bytes .../panoramas/hub_night/panorama_3.png | Bin 0 -> 1903785 bytes .../panoramas/hub_night/panorama_4.png | Bin 0 -> 1334156 bytes .../panoramas/hub_night/panorama_5.png | Bin 0 -> 1484102 bytes .../panoramas/mining_1_day/panorama_0.png | Bin 0 -> 2250360 bytes .../panoramas/mining_1_day/panorama_1.png | Bin 0 -> 1990106 bytes .../panoramas/mining_1_day/panorama_2.png | Bin 0 -> 1917797 bytes .../panoramas/mining_1_day/panorama_3.png | Bin 0 -> 2080411 bytes .../panoramas/mining_1_day/panorama_4.png | Bin 0 -> 1680133 bytes .../panoramas/mining_1_day/panorama_5.png | Bin 0 -> 1368779 bytes .../panoramas/mining_1_night/panorama_0.png | Bin 0 -> 2144730 bytes .../panoramas/mining_1_night/panorama_1.png | Bin 0 -> 1881956 bytes .../panoramas/mining_1_night/panorama_2.png | Bin 0 -> 1660032 bytes .../panoramas/mining_1_night/panorama_3.png | Bin 0 -> 1879865 bytes .../panoramas/mining_1_night/panorama_4.png | Bin 0 -> 1514854 bytes .../panoramas/mining_1_night/panorama_5.png | Bin 0 -> 1357481 bytes .../panoramas/mining_2/panorama_0.png | Bin 0 -> 1750950 bytes .../panoramas/mining_2/panorama_1.png | Bin 0 -> 1672301 bytes .../panoramas/mining_2/panorama_2.png | Bin 0 -> 1702966 bytes .../panoramas/mining_2/panorama_3.png | Bin 0 -> 1681660 bytes .../panoramas/mining_2/panorama_4.png | Bin 0 -> 1823482 bytes .../panoramas/mining_2/panorama_5.png | Bin 0 -> 1375439 bytes .../panoramas/unknown/panorama_0.png | Bin 0 -> 2095449 bytes .../panoramas/unknown/panorama_1.png | Bin 0 -> 2096492 bytes .../panoramas/unknown/panorama_2.png | Bin 0 -> 2082800 bytes .../panoramas/unknown/panorama_3.png | Bin 0 -> 2080972 bytes .../panoramas/unknown/panorama_4.png | Bin 0 -> 2095828 bytes .../panoramas/unknown/panorama_5.png | Bin 0 -> 2083932 bytes .../assets/notenoughupdates/shaders/cape.frag | 4 +- .../assets/notenoughupdates/shaders/fade_cape.frag | 8 +- .../assets/notenoughupdates/shaders/make_gold.frag | 38 ++ .../assets/notenoughupdates/shaders/make_gold.vert | 13 + 158 files changed, 997 insertions(+), 265 deletions(-) create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/profileviewer/Panorama.java delete mode 100644 src/main/java/io/github/moulberry/notenoughupdates/questing/NEUQuesting.java create mode 100644 src/main/java/io/github/moulberry/notenoughupdates/questing/SBScoreboardData.java create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_1_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_2_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/combat_3_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dark_auction/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dark_auction/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dark_auction/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dark_auction/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dark_auction/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dark_auction/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon_hub/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon_hub/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon_hub/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon_hub/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon_hub/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dungeon_hub/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/dynamic_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_1_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/farming_2_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/foraging_1_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/hub_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_day/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_day/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_day/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_day/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_day/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_day/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_night/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_night/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_night/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_night/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_night/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_1_night/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_2/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_2/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_2/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_2/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_2/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/mining_2/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/unknown/panorama_0.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/unknown/panorama_1.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/unknown/panorama_2.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/unknown/panorama_3.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/unknown/panorama_4.png create mode 100644 src/main/resources/assets/notenoughupdates/panoramas/unknown/panorama_5.png create mode 100644 src/main/resources/assets/notenoughupdates/shaders/make_gold.frag create mode 100644 src/main/resources/assets/notenoughupdates/shaders/make_gold.vert (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java index 200569df..d0301b2c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/GuiItemRecipe.java @@ -170,7 +170,7 @@ public class GuiItemRecipe extends GuiScreen { @Override public void handleKeyboardInput() throws IOException { - super.handleKeyboardInput(); //TODO: r and u + super.handleKeyboardInput(); ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); int width = scaledResolution.getScaledWidth(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java index edf1d31c..b879c383 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUManager.java @@ -1079,8 +1079,6 @@ public class NEUManager { } if(craftMatrices.size() > 0) { - Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow( - Minecraft.getMinecraft().thePlayer.openContainer.windowId)); Minecraft.getMinecraft().displayGuiScreen(new GuiItemRecipe("Item Usages", craftMatrices, results, this)); return true; } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index a33c13b3..25b27cc5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -96,7 +96,6 @@ public class NEUOverlay extends Gui { private JsonObject[] searchedItemsArr = null; private boolean itemPaneOpen = false; - private boolean hoveringItemPaneToggle = false; private int page = 0; @@ -1636,21 +1635,16 @@ public class NEUOverlay extends Gui { int rightSide = leftSide+paneWidth-getBoxPadding()-getItemBoxXPadding(); //Tab - Minecraft.getMinecraft().getTextureManager().bindTexture(itemPaneTabArrow); - GlStateManager.color(1f, 1f, 1f, 0.3f); - Utils.drawTexturedRect(width-itemPaneTabOffset.getValue(), height/2 - 50, 20, 100); - GlStateManager.bindTexture(0); + if(!manager.config.disableItemTabOpen.value) { + Minecraft.getMinecraft().getTextureManager().bindTexture(itemPaneTabArrow); + GlStateManager.color(1f, 1f, 1f, 0.3f); + Utils.drawTexturedRect(width-itemPaneTabOffset.getValue(), height/2 - 50, 20, 100); + GlStateManager.bindTexture(0); - if(mouseX > width-itemPaneTabOffset.getValue() && mouseY > height/2 - 50 - && mouseY < height/2 + 50) { - if(!hoveringItemPaneToggle) { - if(!manager.config.disableItemTabOpen.value) { - itemPaneOpen = !itemPaneOpen; - } - hoveringItemPaneToggle = true; + if(!itemPaneOpen && mouseX > width-itemPaneTabOffset.getValue() && mouseY > height/2 - 50 + && mouseY < height/2 + 50) { + itemPaneOpen = true; } - } else { - hoveringItemPaneToggle = false; } //Atomic reference used so that below lambda doesn't complain about non-effectively-final variable diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index a7a30233..734f7ca1 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -14,7 +14,7 @@ import io.github.moulberry.notenoughupdates.infopanes.CosmeticsInfoPane; import io.github.moulberry.notenoughupdates.profileviewer.GuiProfileViewer; import io.github.moulberry.notenoughupdates.profileviewer.ProfileViewer; import io.github.moulberry.notenoughupdates.questing.GuiQuestLine; -import io.github.moulberry.notenoughupdates.questing.NEUQuesting; +import io.github.moulberry.notenoughupdates.questing.SBScoreboardData; import io.github.moulberry.notenoughupdates.util.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; @@ -31,20 +31,15 @@ import net.minecraft.inventory.ContainerChest; import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.scoreboard.ScoreObjective; import net.minecraft.scoreboard.Scoreboard; import net.minecraft.util.ChatComponentText; -import net.minecraft.util.ChatStyle; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.Session; import net.minecraftforge.client.ClientCommandHandler; -import net.minecraftforge.client.event.ClientChatReceivedEvent; -import net.minecraftforge.client.event.GuiOpenEvent; -import net.minecraftforge.client.event.GuiScreenEvent; -import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.client.event.*; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.fml.client.registry.ClientRegistry; @@ -139,10 +134,13 @@ public class NotEnoughUpdates { if(args.length != 1) { Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "idiot.")); + } else { + profileViewer.getProfileByName(args[0], profile -> { + profile.resetCache(); + openGui = new GuiProfileViewer(profile); + }); } - profileViewer.getProfileByName(args[0], profile -> { - openGui = new GuiProfileViewer(profile); - }); + //openGui = new GuiProfileViewer(null); } }); @@ -398,7 +396,7 @@ public class NotEnoughUpdates { joinedSB = false; } } - //NEUQuesting.getInstance().tick(); + SBScoreboardData.getInstance().tick(); //GuiQuestLine.questLine.tick(); } if(currChatMessage != null && System.currentTimeMillis() - lastChatMessage > CHAT_MSG_COOLDOWN) { @@ -473,6 +471,15 @@ public class NotEnoughUpdates { } } + @SubscribeEvent(priority=EventPriority.HIGHEST) + public void onRenderEntitySpecials(RenderLivingEvent.Specials.Pre event) { + if(Minecraft.getMinecraft().currentScreen instanceof GuiProfileViewer) { + if(((GuiProfileViewer)Minecraft.getMinecraft().currentScreen).getEntityPlayer() == event.entity) { + event.setCanceled(true); + } + } + } + @SubscribeEvent public void onRenderGameOverlay(RenderGameOverlayEvent event) { if(event.type != null && event.type.equals(RenderGameOverlayEvent.ElementType.BOSSHEALTH) && diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java index 65f6545e..53cc4639 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/APIManager.java @@ -168,7 +168,9 @@ public class APIManager { args.put("uuid", ""+uuid); manager.hypixelApi.getHypixelApiAsync(manager.config.apiKey.value, "skyblock/profiles", args, jsonObject -> { - if(jsonObject.has("success") && jsonObject.get("success").getAsBoolean()) { + if(jsonObject == null) return; + + if(jsonObject.has("success") && jsonObject.get("success").getAsBoolean()) { incPlayerInfoVersion(); playerInformation = jsonObject.get("profiles").getAsJsonArray(); if(playerInformation == null) return; @@ -366,7 +368,9 @@ public class APIManager { args.put("page", ""+page); manager.hypixelApi.getHypixelApiAsync(manager.config.apiKey.value, "skyblock/auctions", args, jsonObject -> { - if (jsonObject.get("success").getAsBoolean()) { + if(jsonObject == null) return; + + if (jsonObject.get("success").getAsBoolean()) { totalPages = jsonObject.get("totalPages").getAsInt(); activeAuctions = jsonObject.get("totalAuctions").getAsInt(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java index 17ce216e..77fa8425 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/auction/CustomAH.java @@ -103,7 +103,7 @@ public class CustomAH extends Gui { private Category CATEGORY_TRAVEL_SCROLLS = new Category("travelscroll", "Travel Scrolls", "map"); private Category CATEGORY_REFORGE_STONES = new Category("reforgestone", "Reforge Stones", "anvil"); - private Category CATEGORY_RUNES = new Category("rune", "Runes", "end_portal_frame"); + private Category CATEGORY_RUNES = new Category("rune", "Runes", "magma_cream"); private Category CATEGORY_FURNITURE = new Category("furniture", "Furniture", "armor_stand"); private Category CATEGORY_COMBAT = new Category("weapon", "Combat", "golden_sword", CATEGORY_SWORD, diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 81ecc9b4..9607a888 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -1,5 +1,6 @@ package io.github.moulberry.notenoughupdates.profileviewer; +import com.google.common.base.Splitter; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -7,35 +8,49 @@ import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture; import com.mojang.authlib.properties.Property; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; +import io.github.moulberry.notenoughupdates.cosmetics.ShaderManager; +import io.github.moulberry.notenoughupdates.questing.SBScoreboardData; import io.github.moulberry.notenoughupdates.util.TexLoc; import io.github.moulberry.notenoughupdates.util.Utils; +import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityOtherPlayerMP; +import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.network.NetworkPlayerInfo; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.OpenGlHelper; -import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.texture.TextureUtil; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.resources.DefaultPlayerSkin; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; import net.minecraft.client.resources.SkinManager; +import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.util.BlockPos; import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.Charsets; +import org.luaj.vm2.ast.Str; import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.GL14; +import org.lwjgl.opengl.GL20; import java.awt.*; +import java.io.IOException; import java.nio.charset.Charset; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.UUID; +import java.util.*; +import java.util.List; public class GuiProfileViewer extends GuiScreen { @@ -48,6 +63,14 @@ public class GuiProfileViewer extends GuiScreen { private int guiLeft; private int guiTop; + private float backgroundRotation = 0; + + private long currentTime = 0; + private long lastTime = 0; + private long startTime = 0; + + private List tooltipToDisplay = null; + public enum ProfileViewerPage { BASIC } @@ -58,6 +81,9 @@ public class GuiProfileViewer extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { + currentTime = System.currentTimeMillis(); + if(startTime == 0) startTime = currentTime; + super.drawScreen(mouseX, mouseY, partialTicks); drawDefaultBackground(); @@ -67,6 +93,12 @@ public class GuiProfileViewer extends GuiScreen { break; } + lastTime = currentTime; + + if(tooltipToDisplay != null) { + Utils.drawHoveringText(tooltipToDisplay, mouseX, mouseY, width, height, -1, Minecraft.getMinecraft().fontRendererObj); + tooltipToDisplay = null; + } } private String niceUuid(String uuidStr) { @@ -85,33 +117,196 @@ public class GuiProfileViewer extends GuiScreen { return niceAucId.toString(); } + public EntityOtherPlayerMP getEntityPlayer() { + return entityPlayer; + } + private EntityOtherPlayerMP entityPlayer = null; private ResourceLocation playerLocationSkin = null; private ResourceLocation playerLocationCape = null; private String skinType = null; - TexLoc tl = new TexLoc(0, 0, Keyboard.KEY_M); - TexLoc tl2 = new TexLoc(0, 0, Keyboard.KEY_B); - TexLoc tl3 = new TexLoc(0, 0, Keyboard.KEY_J); + private HashMap panoramasMap = new HashMap<>(); + + public ResourceLocation[] getPanoramasForLocation(String location, String identifier) { + if(panoramasMap.containsKey(location)) return panoramasMap.get(location); + try { + ResourceLocation[] panoramasArray = new ResourceLocation[6]; + for(int i=0; i<6; i++) { + panoramasArray[i] = new ResourceLocation("notenoughupdates:panoramas/"+location+"_"+identifier+"/panorama_"+i+".png"); + Minecraft.getMinecraft().getResourceManager().getResource(panoramasArray[i]); + } + panoramasMap.put(location, panoramasArray); + return panoramasArray; + } catch(IOException e) { + try { + ResourceLocation[] panoramasArray = new ResourceLocation[6]; + for(int i=0; i<6; i++) { + panoramasArray[i] = new ResourceLocation("notenoughupdates:panoramas/"+location+"/panorama_"+i+".png"); + Minecraft.getMinecraft().getResourceManager().getResource(panoramasArray[i]); + } + panoramasMap.put(location, panoramasArray); + return panoramasArray; + } catch(IOException e2) { + ResourceLocation[] panoramasArray = new ResourceLocation[6]; + for(int i=0; i<6; i++) { + panoramasArray[i] = new ResourceLocation("notenoughupdates:panoramas/unknown/panorama_"+i+".png"); + } + panoramasMap.put(location, panoramasArray); + return panoramasArray; + } + } + } + + private int backgroundClickedX = -1; + + private static char[] c = new char[]{'k', 'm', 'b', 't'}; + + public static String shortNumberFormat(double n, int iteration) { + double d = ((long) n / 100) / 10.0; + boolean isRound = (d * 10) %10 == 0; + return (d < 1000? + ((d > 99.9 || isRound || (!isRound && d > 9.99)? + (int) d * 10 / 10 : d + "" + ) + "" + c[iteration]) + : shortNumberFormat(d, iteration+1)); + } + private void drawBasicPage(int mouseX, int mouseY, float partialTicks) { + FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; + this.sizeX = 431; this.sizeY = 202; this.guiLeft = (this.width-this.sizeX)/2; this.guiTop = (this.height-this.sizeY)/2; + String location = null; + JsonObject status = profile.getPlayerStatus(); + if(status != null && status.has("mode")) { + location = status.get("mode").getAsString(); + } + + int extraRotation = 0; + if(Mouse.isButtonDown(0)) { + if(backgroundClickedX == -1) { + if(mouseX > guiLeft+23 && mouseX < guiLeft+23+81) { + if(mouseY > guiTop+44 && mouseY < guiTop+44+108) { + backgroundClickedX = mouseX; + } + } + } + } else { + if(backgroundClickedX != -1) { + backgroundRotation += mouseX - backgroundClickedX; + backgroundClickedX = -1; + } + } + if(backgroundClickedX == -1) { + backgroundRotation += (currentTime - lastTime)/400f; + } else { + extraRotation = mouseX - backgroundClickedX; + } + backgroundRotation %= 360; + + String panoramaIdentifier = "day"; + if(SBScoreboardData.getInstance().currentTimeDate != null) { + if(SBScoreboardData.getInstance().currentTimeDate.before(new Date(0, 0, 0, 6, 0, 0))) { + if(SBScoreboardData.getInstance().currentTimeDate.after(new Date(0, 0, 0, 20, 0, 0))) { + panoramaIdentifier = "night"; + } + } + } + + Panorama.drawPanorama(-backgroundRotation-extraRotation, guiLeft+23, guiTop+44, 81, 108, + getPanoramasForLocation(location==null?"unknown":location, panoramaIdentifier)); + Minecraft.getMinecraft().getTextureManager().bindTexture(pv_basic); Utils.drawTexturedRect(guiLeft, guiTop, sizeX, sizeY, GL11.GL_NEAREST); - tl.handleKeyboardInput(); - tl2.handleKeyboardInput(); - tl3.handleKeyboardInput(); + if(entityPlayer != null && profile.getHypixelProfile() != null) { + String rank = Utils.getElementAsString(profile.getHypixelProfile().get("rank"), Utils.getElementAsString(profile.getHypixelProfile().get("newPackageRank"), "NONE")); + EnumChatFormatting rankPlusColorECF = EnumChatFormatting.getValueByName(Utils.getElementAsString(profile.getHypixelProfile().get("rankPlusColor"), "WHITE")); + String rankPlusColor = EnumChatFormatting.WHITE.toString(); + if(rankPlusColorECF != null) { + rankPlusColor = rankPlusColorECF.toString(); + } + + JsonObject misc = Utils.getConstant("misc"); + if(misc != null) { + if(misc.has("ranks")) { + String rankName = Utils.getElementAsString(Utils.getElement(misc, "ranks."+rank+".tag"), null); + String rankColor = Utils.getElementAsString(Utils.getElement(misc, "ranks."+rank+".color"), "7"); + String rankPlus = Utils.getElementAsString(Utils.getElement(misc, "ranks."+rank+".plus"), ""); + + String name = entityPlayer.getName(); + + if(misc.has("special_bois")) { + JsonArray special_bois = misc.get("special_bois").getAsJsonArray(); + for(int i=0; i guiLeft+132 && mouseX < guiLeft+212) { + if(mouseY > guiTop+32+12.5f*i && mouseY < guiTop+40+12.5f*i) { + List split = splitter.splitToList(statNamePretty); + PlayerStats.Stats baseStats = PlayerStats.getBaseStats(); + tooltipToDisplay = new ArrayList<>(); + tooltipToDisplay.add(statNamePretty); + int base = Math.round(baseStats.get(statName)); + tooltipToDisplay.add(EnumChatFormatting.GRAY+"Base "+split.get(1)+": "+EnumChatFormatting.GREEN+base+" "+split.get(0)); + int passive = Math.round(profile.getPassiveStats(null).get(statName)-baseStats.get(statName)); + tooltipToDisplay.add(EnumChatFormatting.GRAY+"Passive "+split.get(1)+" Bonus: +"+EnumChatFormatting.YELLOW+passive+" "+split.get(0)); + int itemBonus = Math.round(stats.get(statName)-profile.getPassiveStats(null).get(statName)); + tooltipToDisplay.add(EnumChatFormatting.GRAY+"Item "+split.get(1)+" Bonus: +"+EnumChatFormatting.DARK_PURPLE+itemBonus+" "+split.get(0)); + int finalStat = Math.round(stats.get(statName)); + tooltipToDisplay.add(EnumChatFormatting.GRAY+"Final "+split.get(1)+": +"+EnumChatFormatting.RED+finalStat+" "+split.get(0)); } } } - - GlStateManager.color(1, 1, 1, 1); - Utils.drawStringCenteredScaledMaxWidth(statNamePretty + " " + EnumChatFormatting.WHITE + val, Minecraft.getMinecraft().fontRendererObj, - guiLeft+172f, guiTop+36+12.5f*i, true, 85, Color.BLACK.getRGB()); + } else { + //"stats not enabled in api" } - int position = 0; - for(Map.Entry entry : skillToSkillNameMap.entrySet()) { - int yPosition = position % 7; - int xPosition = position / 7; + if(skillInfo != null) { + int position = 0; + for(Map.Entry entry : ProfileViewer.getSkillToSkillDisplayMap().entrySet()) { + int yPosition = position % 7; + int xPosition = position / 7; - String skillName = entry.getValue(); + String skillName = entry.getValue().getDisplayName(); - float level = (int)skillInfo.get(entry.getKey()).getAsFloat(); + float level = Utils.getElementAsFloat(skillInfo.get("level_"+entry.getKey()), 0); + int levelFloored = (int)Math.floor(level); - for(int xOff=-1; xOff<=1; xOff++) { - for(int yOff=-1; yOff<=1; yOff++) { - if(Math.abs(xOff) != Math.abs(yOff)) { - //Utils.drawStringCenteredScaledMaxWidth(Utils.cleanColourNotModifiers(skillName) + " " + level, Minecraft.getMinecraft().fontRendererObj, - // guiLeft+tl.x+tl2.x*xPosition+xOff, guiTop+tl.y+tl2.y*yPosition+yOff, false, 85, new Color(100, 100, 100, 100).getRGB()); + int x = guiLeft+237+86*xPosition; + int y = guiTop+31+21*yPosition; + + for(int xOff=-2; xOff<=2; xOff++) { + for(int yOff=-2; yOff<=2; yOff++) { + if(Math.abs(xOff) != Math.abs(yOff)) { + Utils.drawStringCenteredYScaledMaxWidth(Utils.cleanColourNotModifiers(skillName) + " " + levelFloored, Minecraft.getMinecraft().fontRendererObj, + x+14+xOff/2f, y+yOff/2f, false, 60, new Color(0, 0, 0, + 200/Math.max(Math.abs(xOff), Math.abs(yOff))).getRGB()); + } } } - } - GlStateManager.color(1, 1, 1, 1); - Utils.drawStringCenteredScaledMaxWidth(skillName + " " + EnumChatFormatting.WHITE + level, Minecraft.getMinecraft().fontRendererObj, - guiLeft+277+86*xPosition, guiTop+36+21*yPosition, true, 85, Color.BLACK.getRGB()); + GlStateManager.color(1, 1, 1, 1); + Utils.drawStringCenteredYScaledMaxWidth(EnumChatFormatting.WHITE + skillName + " " + EnumChatFormatting.WHITE + levelFloored, Minecraft.getMinecraft().fontRendererObj, + x+14, y, false, 60, 4210752); - position++; + if(skillInfo.get("maxed_"+entry.getKey()).getAsBoolean()) { + renderGoldBar(x, y+6, 80); + } else { + renderBar(x, y+6, 80, level%1); + } + + if(mouseX > x && mouseX < x+80) { + if(mouseY > y+4 && mouseY < y+13) { + String levelStr; + if(skillInfo.get("maxed_"+entry.getKey()).getAsBoolean()) { + levelStr = EnumChatFormatting.GOLD+"MAXED!"; + } else { + int maxXp = (int)skillInfo.get("maxxp_"+entry.getKey()).getAsFloat(); + levelStr = EnumChatFormatting.DARK_PURPLE.toString() + shortNumberFormat(Math.round((level%1)*maxXp), 0) + "/" + shortNumberFormat(maxXp, 0); + } + + tooltipToDisplay = Utils.createList(levelStr); + } + } + + GL11.glTranslatef((x), (y-8*0.7f), 0); + GL11.glScalef(0.7f, 0.7f, 1); + Utils.drawItemStackLinear(entry.getValue(), 0, 0); + GL11.glScalef(1/0.7f, 1/0.7f, 1); + GL11.glTranslatef(-(x), -(y-8*0.7f), 0); + + position++; + } + } else { + //api not enabled } } - private static final LinkedHashMap skillToSkillNameMap = new LinkedHashMap<>(); - static { - skillToSkillNameMap.put("level_skill_taming", "Taming"); - skillToSkillNameMap.put("level_skill_mining", "Mining"); - skillToSkillNameMap.put("level_skill_foraging", "Foraging"); - skillToSkillNameMap.put("level_skill_enchanting", "Enchanting"); - skillToSkillNameMap.put("level_skill_carpentry", "Carpentry"); - skillToSkillNameMap.put("level_skill_farming", "Farming"); - skillToSkillNameMap.put("level_skill_combat", "Combat"); - skillToSkillNameMap.put("level_skill_fishing", "Fishing"); - skillToSkillNameMap.put("level_skill_alchemy", "Alchemy"); - skillToSkillNameMap.put("level_skill_runecrafting", "Runecrafting"); - skillToSkillNameMap.put("level_slayer_zombie", "Revenant Slayer"); - skillToSkillNameMap.put("level_slayer_spider", "Tarantula Slayer"); - skillToSkillNameMap.put("level_slayer_wolf", "Sven Slayer"); - } + private void renderGoldBar(float x, float y, float xSize) { - /*private void renderBar(float x, float y, float xSize, float ySize, float completed) { - this.mc.getTextureManager().bindTexture(Gui.icons); + Minecraft.getMinecraft().getTextureManager().bindTexture(Gui.icons); + ShaderManager shaderManager = ShaderManager.getInstance(); + shaderManager.loadShader("make_gold"); + shaderManager.loadData("make_gold", "amount", (startTime-System.currentTimeMillis())/10000f); - float yScale = ySize/5; + Utils.drawTexturedRect(x, y, xSize/2f, 5, 0/256f, (xSize/2f)/256f, 79/256f, 84/256f, GL11.GL_NEAREST); + Utils.drawTexturedRect(x+xSize/2f, y, xSize/2f, 5, (182-xSize/2f)/256f, 182/256f, 79/256f, 84/256f, GL11.GL_NEAREST); + GL20.glUseProgram(0); + } - if (i > 0) - { - int j = 182; - int k = (int)(this.mc.thePlayer.experience * (float)(j + 1)); - int l = p_175176_1_.getScaledHeight() - 32 + 3; + private void renderBar(float x, float y, float xSize, float completed) { + Minecraft.getMinecraft().getTextureManager().bindTexture(Gui.icons); - Utils.drawTexturedRect(x, y, xSize, ); + completed = Math.round(completed/0.05f)*0.05f; - this.drawTexturedModalRect(p_175176_2_, l, 0, 64, j, 5); + float notcompleted = 1-completed; - if (k > 0) - { - this.drawTexturedModalRect(p_175176_2_, l, 0, 69, k, 5); - } + int displayNum = 0;//tl.x%5; + + GlStateManager.color(1, 1, 1, 1); + float width = 0; + + if(completed < 0.5f && (displayNum == 1 || displayNum == 0)) { + width = (0.5f - completed) * xSize; + Utils.drawTexturedRect(x+xSize*completed, y, width, 5, xSize*completed/256f, (xSize/2f)/256f, 74/256f, 79/256f, GL11.GL_NEAREST); + } + if(completed < 1f && (displayNum == 2 || displayNum == 0)) { + width = Math.min(xSize*notcompleted, xSize/2f); + Utils.drawTexturedRect(x+(xSize/2f)+Math.max(xSize*(completed-0.5f), 0), y, width, 5, + (182-(xSize/2f)+Math.max(xSize*(completed-0.5f), 0))/256f, 182/256f, 74/256f, 79/256f, GL11.GL_NEAREST); } - if (this.mc.thePlayer.experienceLevel > 0) - { - this.mc.mcProfiler.startSection("expLevel"); - int k1 = 8453920; - String s = "" + this.mc.thePlayer.experienceLevel; - int l1 = (p_175176_1_.getScaledWidth() - this.getFontRenderer().getStringWidth(s)) / 2; - int i1 = p_175176_1_.getScaledHeight() - 31 - 4; - int j1 = 0; - this.getFontRenderer().drawString(s, l1 + 1, i1, 0); - this.getFontRenderer().drawString(s, l1 - 1, i1, 0); - this.getFontRenderer().drawString(s, l1, i1 + 1, 0); - this.getFontRenderer().drawString(s, l1, i1 - 1, 0); - this.getFontRenderer().drawString(s, l1, i1, k1); - this.mc.mcProfiler.endSection(); + if(completed > 0f && (displayNum == 3 || displayNum == 0)) { + width = Math.min(xSize*completed, xSize/2f); + Utils.drawTexturedRect(x, y, width, 5, + 0/256f, width/256f, 79/256f, 84/256f, GL11.GL_NEAREST); } - }*/ + if(completed > 0.5f && (displayNum == 4 || displayNum == 0)) { + width = Math.max(xSize*(completed-0.5f), xSize/2f); + Utils.drawTexturedRect(x+(xSize/2f), y, width, 5, + (182-(xSize/2f))/256f, (182-(xSize/2f)+width)/256f, 79/256f, 84/256f, GL11.GL_NEAREST); + } + } + private static final ResourceLocation shadowTextures = new ResourceLocation("textures/misc/shadow.png"); public static void drawEntityOnScreen(int posX, int posY, int scale, float mouseX, float mouseY, EntityLivingBase ent) { GlStateManager.enableColorMaterial(); GlStateManager.pushMatrix(); GlStateManager.translate((float)posX, (float)posY, 50.0F); GlStateManager.scale((float)(-scale), (f