diff options
Diffstat (limited to 'src/main/java/io/github')
6 files changed, 19 insertions, 4 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java index 8c80c7b9..56ae4a1d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NotEnoughUpdates.java @@ -265,6 +265,9 @@ public class NotEnoughUpdates { if (config.profileViewer.pageLayout.size() == 12) { config.profileViewer.pageLayout.add(12); } + if (config.profileViewer.pageLayout.size() == 13) { + config.profileViewer.pageLayout.add(13); + } if ((config.apiData.repoUser.isEmpty() || config.apiData.repoName.isEmpty() || config.apiData.repoBranch.isEmpty()) && config.apiData.autoupdate_new) { config.apiData.repoUser = "NotEnoughUpdates"; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ProfileViewer.java index 08ddadf8..a511178b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/ProfileViewer.java @@ -64,11 +64,12 @@ public class ProfileViewer { "\u00a7eBestiary", "\u00a7eCrimson Isle", "\u00a7eMuseum", - "\u00a7eRift" + "\u00a7eRift", + "\u00a7eGarden" }, allowDeleting = false ) - public List<Integer> pageLayout = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)); + public List<Integer> pageLayout = new ArrayList<>(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)); @Expose @ConfigOption( 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 c57fd729..2fbe948b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -24,6 +24,7 @@ import io.github.moulberry.notenoughupdates.NotEnoughUpdates; import io.github.moulberry.notenoughupdates.core.util.StringUtils; import io.github.moulberry.notenoughupdates.cosmetics.ShaderManager; import io.github.moulberry.notenoughupdates.itemeditor.GuiElementTextField; +import io.github.moulberry.notenoughupdates.miscfeatures.profileviewer.GardenPage; import io.github.moulberry.notenoughupdates.miscfeatures.profileviewer.bestiary.BestiaryPage; import io.github.moulberry.notenoughupdates.profileviewer.rift.RiftPage; import io.github.moulberry.notenoughupdates.profileviewer.trophy.TrophyFishPage; @@ -220,6 +221,7 @@ public class GuiProfileViewer extends GuiScreen { pages.put(ProfileViewerPage.CRIMSON_ISLE, new CrimsonIslePage(this)); pages.put(ProfileViewerPage.MUSEUM, new MuseumPage(this)); pages.put(ProfileViewerPage.RIFT, new RiftPage(this)); + pages.put(ProfileViewerPage.GARDEN, new GardenPage(this)); } catch (Exception ex) { pages.put(ProfileViewerPage.CRASH_RECOVERY, new CrashRecoveryPage(this, ex, currentPage)); currentPage = ProfileViewerPage.CRASH_RECOVERY; @@ -1246,6 +1248,8 @@ public class GuiProfileViewer extends GuiScreen { return (level.totalXp / 1000000) * 100; } else if (skillName.equalsIgnoreCase("social")) { return (level.totalXp / 272800) * 100; + } else if (skillName.equalsIgnoreCase("garden")) { + return (level.totalXp / 60120) * 100; } else { if (level.maxLevel == 60) { return (level.totalXp / SkillsWeight.SKILLS_LEVEL_60) * 100; @@ -1292,7 +1296,8 @@ public class GuiProfileViewer extends GuiScreen { BESTIARY(9, Items.iron_sword, "§cBestiary"), CRIMSON_ISLE(10, Item.getItemFromBlock(Blocks.netherrack), "§4Crimson Isle"), MUSEUM(11, Items.leather_chestplate, "§6Museum"), - RIFT(12, Items.ender_eye, "§5Rift"); + RIFT(12, Items.ender_eye, "§5Rift"), + GARDEN(13, Item.getItemFromBlock(Blocks.grass), "§2Garden"); public final ItemStack stack; public final int id; diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/data/APIDataJson.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/data/APIDataJson.java index 7e534d33..a8400b0d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/data/APIDataJson.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/data/APIDataJson.java @@ -28,7 +28,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import static io.github.moulberry.notenoughupdates.profileviewer.rift.RiftPage.readBase64; @@ -278,6 +277,7 @@ public class APIDataJson { public static class GardenPlayerData { public int larva_consumed = 0; + public int copper = 0; } public GlacitePlayerData glacite_player_data = new GlacitePlayerData(); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java index 7b495c52..a2cd4bb0 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Constants.java @@ -88,6 +88,7 @@ public class Constants { public static JsonObject HOPPITY; public static JsonObject DYES; public static JsonObject GEMSTONES; + public static JsonObject GARDEN; private static final ReentrantLock lock = new ReentrantLock(); @@ -119,6 +120,7 @@ public class Constants { HOPPITY = Utils.getConstant("hoppity", gson); DYES = Utils.getConstant("dyes", gson); GEMSTONES = Utils.getConstant("gemstones", gson); + GARDEN = Utils.getConstant("garden", gson); parseEssenceCosts(); } catch (Exception ex) { diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index 61a0deb1..5a2018ed 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -1121,6 +1121,10 @@ public class Utils { drawStringCenteredScaledMaxWidth(str, x, y + 4, false, maxLength, 421075); } + public static void renderShadowedString(String str, int x, int y, int maxLength) { + renderShadowedString(str, (float) x, (float) y, maxLength); + } + public static void renderAlignedString(String first, String second, float x, float y, int length) { FontRenderer fontRendererObj = Minecraft.getMinecraft().fontRendererObj; if (fontRendererObj.getStringWidth(first + " " + second) >= length) { |
