-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
outsource minosoft boot process from main class to external class
That will make it much easier to use a custom main class, maybe useful on android
- Loading branch information
Showing
22 changed files
with
159 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/de/bixilon/minosoft/data/language/IntegratedLanguage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Minosoft | ||
* Copyright (C) 2020-2023 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. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
* | ||
* This software is not affiliated with Mojang AB, the original developer of Minecraft. | ||
*/ | ||
|
||
package de.bixilon.minosoft.data.language | ||
|
||
import de.bixilon.minosoft.assets.IntegratedAssets | ||
import de.bixilon.minosoft.data.language.manager.MultiLanguageManager | ||
import de.bixilon.minosoft.data.registries.identified.Namespaces | ||
import de.bixilon.minosoft.data.registries.identified.Namespaces.minosoft | ||
import de.bixilon.minosoft.util.logging.Log | ||
import de.bixilon.minosoft.util.logging.LogLevels | ||
import de.bixilon.minosoft.util.logging.LogMessageType | ||
|
||
object IntegratedLanguage { | ||
val LANGUAGE = MultiLanguageManager() | ||
|
||
|
||
fun load(name: String) { | ||
Log.log(LogMessageType.LOADING, LogLevels.VERBOSE) { "Loading language files (${name})" } | ||
val language = LanguageUtil.load(name, null, IntegratedAssets.DEFAULT, minosoft("language/")) | ||
LANGUAGE.translators[Namespaces.MINOSOFT] = language | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.