From 379043ee8837f120c9fd7f591ea18c16925d67c9 Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Fri, 9 Aug 2024 22:22:50 +0200 Subject: [PATCH] some education fixes --- src/main/java/de/bixilon/minosoft/Minosoft.kt | 3 +-- .../minosoft/education/MinosoftEducation.kt | 19 ++++++++++++++++++- .../elements/other/PerformanceHUDElement.kt | 4 ++-- .../assets/minosoft/education/blocks.json | 2 +- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/Minosoft.kt b/src/main/java/de/bixilon/minosoft/Minosoft.kt index 4ea749a1f..9c994e090 100644 --- a/src/main/java/de/bixilon/minosoft/Minosoft.kt +++ b/src/main/java/de/bixilon/minosoft/Minosoft.kt @@ -46,7 +46,6 @@ import de.bixilon.minosoft.modding.event.master.GlobalEventMaster import de.bixilon.minosoft.modding.loader.phase.DefaultModPhases import de.bixilon.minosoft.properties.MinosoftProperties import de.bixilon.minosoft.properties.MinosoftPropertiesLoader -import de.bixilon.minosoft.terminal.AutoConnect import de.bixilon.minosoft.terminal.CommandLineArguments import de.bixilon.minosoft.terminal.RunConfiguration import de.bixilon.minosoft.updater.MinosoftUpdater @@ -118,7 +117,7 @@ object Minosoft { Log.log(LogMessageType.GENERAL, LogLevels.WARN) { "Eros is disabled, no gui will show up! Use the cli to connect to servers!" } } - RunConfiguration.AUTO_CONNECT_TO?.let { AutoConnect.autoConnect(it) } + // RunConfiguration.AUTO_CONNECT_TO?.let { AutoConnect.autoConnect(it) } } private fun javafx(taskWorker: TaskWorker) { diff --git a/src/main/java/de/bixilon/minosoft/education/MinosoftEducation.kt b/src/main/java/de/bixilon/minosoft/education/MinosoftEducation.kt index 987dc6674..334c9ce1b 100644 --- a/src/main/java/de/bixilon/minosoft/education/MinosoftEducation.kt +++ b/src/main/java/de/bixilon/minosoft/education/MinosoftEducation.kt @@ -17,7 +17,11 @@ import de.bixilon.kutil.observer.DataObserver.Companion.observe import de.bixilon.kutil.shutdown.AbstractShutdownReason import de.bixilon.kutil.shutdown.ShutdownManager import de.bixilon.minosoft.Minosoft +import de.bixilon.minosoft.assets.minecraft.index.IndexAssetsType import de.bixilon.minosoft.config.profile.profiles.account.AccountProfileManager +import de.bixilon.minosoft.config.profile.profiles.audio.AudioProfileManager +import de.bixilon.minosoft.config.profile.profiles.rendering.RenderingProfileManager +import de.bixilon.minosoft.config.profile.profiles.resources.ResourcesProfileManager import de.bixilon.minosoft.data.accounts.Account import de.bixilon.minosoft.data.accounts.types.offline.OfflineAccount import de.bixilon.minosoft.education.config.EducationC @@ -72,12 +76,25 @@ object MinosoftEducation { RunConfiguration.APPLICATION_NAME = "Minosoft Education" RunConfiguration.IGNORE_YGGDRASIL = true RunConfiguration.IGNORE_MODS = true + RunConfiguration.PROFILES_HOT_RELOADING = false + RunConfiguration.PROFILES_SAVING = false + } + + fun postSetup() { + AudioProfileManager.selected.enabled = false + AudioProfileManager.selected.skipLoading = true + + RenderingProfileManager.selected.performance.fastBedrock = false + ResourcesProfileManager.selected.assets.indexAssetsTypes.clear() + ResourcesProfileManager.selected.assets.indexAssetsTypes += IndexAssetsType.OTHER + ResourcesProfileManager.selected.assets.indexAssetsTypes += IndexAssetsType.LANGUAGE } @JvmStatic fun main(args: Array) { setup() - Minosoft.main(args) + Minosoft.main(emptyArray()) + postSetup() // TODO: load education.json diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/hud/elements/other/PerformanceHUDElement.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/hud/elements/other/PerformanceHUDElement.kt index a40478747..4ff1e3b01 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/hud/elements/other/PerformanceHUDElement.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/hud/elements/other/PerformanceHUDElement.kt @@ -1,6 +1,6 @@ /* * Minosoft - * Copyright (C) 2020-2023 Moritz Zwerger + * Copyright (C) 2020-2024 Moritz Zwerger * * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * @@ -52,7 +52,7 @@ class PerformanceHUDElement(guiRenderer: GUIRenderer) : Element(guiRenderer), La override fun poll(): Boolean { val debugHUDElement = guiRenderer.hud[DebugHUDElement] - val hide = debugHUDElement?.enabled == true + val hide = true val fps = guiRenderer.context.renderStats.smoothAvgFPS.rounded10 if (this.hide == hide && this.fps == fps) { return false diff --git a/src/main/resources/assets/minosoft/education/blocks.json b/src/main/resources/assets/minosoft/education/blocks.json index 1880228b5..2cbe2f797 100644 --- a/src/main/resources/assets/minosoft/education/blocks.json +++ b/src/main/resources/assets/minosoft/education/blocks.json @@ -36,7 +36,7 @@ "minecraft:cobblestone": { "id": 12, "states": { - "15": {} + "14": {} } }, "minecraft:oak_planks": {