diff options
author | makamys <makamys@outlook.com> | 2022-06-21 09:21:26 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-21 09:22:34 +0200 |
commit | b043e75245429a2b6ee1402cee826fcec8f7af04 (patch) | |
tree | 32f9e5467abf405d5d435302ac3288a5da2845e1 | |
parent | 30fd0a05f82ec32b67fb629f35fd8bdaa3b5101f (diff) | |
download | Neodymium-b043e75245429a2b6ee1402cee826fcec8f7af04.tar.gz Neodymium-b043e75245429a2b6ee1402cee826fcec8f7af04.tar.bz2 Neodymium-b043e75245429a2b6ee1402cee826fcec8f7af04.zip |
Add update check via MCLib
-rw-r--r-- | gradle.properties | 1 | ||||
-rw-r--r-- | makalibs.gradle | 19 | ||||
-rw-r--r-- | project.gradle | 2 | ||||
-rw-r--r-- | src/main/java/makamys/neodymium/Neodymium.java | 9 | ||||
-rw-r--r-- | updatejson/update.json | 9 |
5 files changed, 40 insertions, 0 deletions
diff --git a/gradle.properties b/gradle.properties index a8e70f2..28ac386 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,6 +7,7 @@ group=makamys.neodymium # Forge properties minecraft_version=1.7.10 forge_version=10.13.4.1614-1.7.10 +update_url=https://raw.githubusercontent.com/makamys/neodymium/master/updatejson/update.json enable_mixin=true multiproject_structure=false diff --git a/makalibs.gradle b/makalibs.gradle new file mode 100644 index 0000000..1460a57 --- /dev/null +++ b/makalibs.gradle @@ -0,0 +1,19 @@ +/* Common code in my projects using my libraries */ + +repositories { + maven { url 'https://jitpack.io' } +} + +minecraft { + srgExtra "PK: makamys/mclib makamys/${project.modid}/repackage/makamys/mclib" +} + +dependencies { + shade('com.github.makamys:MCLib:0.3.3'){ + exclude group: "codechicken" + } +} + +minecraft { + replace '@UPDATE_URL@', project.update_url +} diff --git a/project.gradle b/project.gradle index c25475a..ed0b64a 100644 --- a/project.gradle +++ b/project.gradle @@ -5,3 +5,5 @@ jar { ) } } + +apply from: "makalibs.gradle" diff --git a/src/main/java/makamys/neodymium/Neodymium.java b/src/main/java/makamys/neodymium/Neodymium.java index 2b4ab75..d70330a 100644 --- a/src/main/java/makamys/neodymium/Neodymium.java +++ b/src/main/java/makamys/neodymium/Neodymium.java @@ -14,12 +14,15 @@ import org.lwjgl.input.Keyboard; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.event.FMLConstructionEvent; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; +import makamys.mclib.core.MCLib; +import makamys.mclib.core.MCLibModules; import makamys.neodymium.renderer.NeoRenderer; import makamys.neodymium.util.SpriteUtil; import net.minecraft.client.Minecraft; @@ -51,8 +54,14 @@ public class Neodymium private static Method ofIsFastRenderMethod; @EventHandler + public void preInit(FMLConstructionEvent event) { + MCLib.init(); + } + + @EventHandler public void preInit(FMLPreInitializationEvent event) { + MCLibModules.updateCheckAPI.submitModTask(MODID, "@UPDATE_URL@"); Config.reloadConfig(); } diff --git a/updatejson/update.json b/updatejson/update.json new file mode 100644 index 0000000..55309d7 --- /dev/null +++ b/updatejson/update.json @@ -0,0 +1,9 @@ +{ + "homepage": "https://github.com/makamys/neodymium/releases", + "1.7.10": { + "0.1": "" + }, + "promos": { + "1.7.10-latest": "0.1" + } +}
\ No newline at end of file |