diff options
author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2024-03-26 20:46:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 20:46:05 +0100 |
commit | 00d6b3020d25b9af0ec43ee908aa36d49fa87b3d (patch) | |
tree | 6c3205ebcecf127023bd8e8277b5acef19c547fd /src/main/java/at/hannibal2 | |
parent | 7e597f25949aad4567ebba6bf8908a5ff74bb1a1 (diff) | |
download | skyhanni-00d6b3020d25b9af0ec43ee908aa36d49fa87b3d.tar.gz skyhanni-00d6b3020d25b9af0ec43ee908aa36d49fa87b3d.tar.bz2 skyhanni-00d6b3020d25b9af0ec43ee908aa36d49fa87b3d.zip |
add hot dog automatic (#1281)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt | 2 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt index 841b8c188..ae97457ff 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/ConfigUpdaterMigrator.kt @@ -11,7 +11,7 @@ import com.google.gson.JsonPrimitive object ConfigUpdaterMigrator { val logger = LorenzLogger("ConfigMigration") - const val CONFIG_VERSION = 29 + const val CONFIG_VERSION = 30 fun JsonElement.at(chain: List<String>, init: Boolean): JsonElement? { if (chain.isEmpty()) return this if (this !is JsonObject) return null diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt index 3a2c7740b..b9ad9960e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/CustomScoreboard.kt @@ -31,6 +31,7 @@ import at.hannibal2.skyhanni.utils.RenderUtils.HorizontalAlignment import at.hannibal2.skyhanni.utils.RenderUtils.renderStringsAlignedWidth import at.hannibal2.skyhanni.utils.StringUtils.firstLetterUppercase import at.hannibal2.skyhanni.utils.TabListData +import com.google.gson.JsonPrimitive import net.minecraftforge.client.GuiIngameForge import net.minecraftforge.client.event.RenderGameOverlayEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -167,6 +168,12 @@ class CustomScoreboard { @SubscribeEvent fun onConfigFix(event: ConfigUpdaterMigrator.ConfigFixEvent) { - event.move(28, "gui.customscoreboard.displayConfig.showAllActiveEvents", "gui.customscoreboard.displayConfig.eventsConfig.showAllActiveEvents") + val prefix = "gui.customScoreboard.displayConfig" + event.move(28, "$prefix.showAllActiveEvents", "$prefix.eventsConfig.showAllActiveEvents") + event.transform(30, "$prefix.eventsConfig.eventEntries") { element -> + val array = element.asJsonArray + array.add(JsonPrimitive(ScoreboardEvents.HOT_DOG_CONTEST.name)) + array + } } } |