feat: config file versioning
Some checks failed
Build and test / build-and-test (push) Waiting to run
Release tagged build / release-tags (push) Has been cancelled

This commit is contained in:
Yui 2024-12-01 18:50:46 -03:00
parent 04dcfb5870
commit 6eef1d1fab
Signed by: yui
GPG Key ID: F368D23A0ABA04B4
5 changed files with 13 additions and 8 deletions

View File

@ -2,3 +2,8 @@
plugins { plugins {
id 'com.gtnewhorizons.gtnhconvention' id 'com.gtnewhorizons.gtnhconvention'
} }
minecraft{
injectedTags.put("MCVERSION", version)
injectedTags.put("CONFIG_VERSION", "1.0.0")
}

View File

@ -15,7 +15,7 @@ public class CommonProxy {
// preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the // preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
// GameRegistry." (Remove if not needed) // GameRegistry." (Remove if not needed)
public void preInit(FMLPreInitializationEvent event) { public void preInit(FMLPreInitializationEvent event) {
Config.configuration = new Configuration(event.getSuggestedConfigurationFile()); Config.configuration = new Configuration(event.getSuggestedConfigurationFile(), Tags.CONFIG_VERSION);
Config.synchronizeConfiguration(); Config.synchronizeConfiguration();
MCStreamerBot.LOG.info("MCStreamerBot is meowing in version " + Tags.VERSION); MCStreamerBot.LOG.info("MCStreamerBot is meowing in version " + Tags.VERSION);

View File

@ -13,7 +13,7 @@ import moe.yuyui.mcstreamerbot.common.EventListener;
@Mod( @Mod(
modid = MCStreamerBot.MODID, modid = MCStreamerBot.MODID,
version = "1.0.1-" + Tags.VERSION, version = Tags.VERSION,
name = "MCStreamerBot", name = "MCStreamerBot",
acceptedMinecraftVersions = "[1.7.10]", acceptedMinecraftVersions = "[1.7.10]",
guiFactory = "moe.yuyui." + MCStreamerBot.MODID + ".gui.MCStreamerBotGuiFactory") guiFactory = "moe.yuyui." + MCStreamerBot.MODID + ".gui.MCStreamerBotGuiFactory")

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) [year] [fullname] Copyright (c) 2024 Yui yui@yuyui.moe
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -3,13 +3,13 @@
"modList": [{ "modList": [{
"modid": "${modId}", "modid": "${modId}",
"name": "${modName}", "name": "${modName}",
"description": "An example mod for Minecraft 1.7.10 with Forge focused on a stable setup.", "description": "A mod that integrates with Streamer.bot through websocket",
"version": "${modVersion}", "version": "${modVersion}",
"mcversion": "${minecraftVersion}", "mcversion": "${minecraftVersion}",
"url": "https://github.com/SinTh0r4s/MyMod", "url": "https://git.osufx.com/yui/mc-streamerbot-integration",
"updateUrl": "", "updateUrl": "",
"authorList": ["SinTho0r4s"], "authorList": ["yuyui.moe"],
"credits": "", "credits": "yuyui.moe for developing this mod, Vampurrya for the idea.",
"logoFile": "", "logoFile": "",
"screenshots": [], "screenshots": [],
"parent": "", "parent": "",