This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,26 @@ | ||
package com.scottkillen.mod.koresample; | ||
|
||
import com.scottkillen.mod.koresample.compat.versionchecker.Versioned; | ||
import cpw.mods.fml.common.Mod; | ||
import cpw.mods.fml.common.Mod.EventHandler; | ||
import cpw.mods.fml.common.Mod.Instance; | ||
import cpw.mods.fml.common.event.FMLInterModComms; | ||
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | ||
|
||
@SuppressWarnings({ | ||
"StaticNonFinalField", | ||
"WeakerAccess", | ||
"StaticVariableMayNotBeInitialized", | ||
"NonConstantFieldWithUpperCaseName", | ||
"MethodMayBeStatic" | ||
"NonConstantFieldWithUpperCaseName", "UtilityClass", | ||
"UtilityClassWithoutPrivateConstructor" | ||
}) | ||
@Mod(modid = TheMod.MOD_ID, name = TheMod.MOD_NAME, version = TheMod.MOD_VERSION, useMetadata = true) | ||
public final class TheMod implements Versioned | ||
public final class TheMod | ||
{ | ||
static final String MOD_ID = "koresample"; | ||
static final String MOD_NAME = "Kore Sample"; | ||
static final String MOD_VERSION = "${mod_version}"; | ||
private static final String RESOURCE_PREFIX = MOD_ID.toLowerCase() + ':'; | ||
private static final String VERSIONCHECK_URL = | ||
"https://raw.githubusercontent.com/ScottKillen/glowing-ninja/master/KoreSample.json"; | ||
|
||
@Instance(MOD_ID) | ||
public static TheMod INSTANCE; | ||
|
||
@SuppressWarnings("unused") | ||
public static String resourcePrefix() { return RESOURCE_PREFIX; } | ||
|
||
@EventHandler | ||
public void onFMLPreInitialization(FMLPreInitializationEvent event) { addVersionCheck(this); } | ||
|
||
public void addVersionCheck(Versioned versionCheck) | ||
{ | ||
FMLInterModComms.sendRuntimeMessage(versionCheck.modID(), "VersionChecker", "addVersionCheck", | ||
versionCheck.versionInfoURL()); | ||
} | ||
|
||
@Override | ||
public String modID() { return MOD_ID; } | ||
|
||
@Override | ||
public String versionInfoURL() { return VERSIONCHECK_URL; } | ||
} |
1 change: 1 addition & 0 deletions
1
src/main/java/com/scottkillen/mod/koresample/compat/versionchecker/Versioned.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#Sat, 27 Jun 2015 17:24:29 -0400 | ||
#Sat, 27 Jun 2015 17:51:35 -0400 | ||
version_mc=1.7.10 | ||
version_forge=10.13.4.1448 | ||
|
||
version_major=1 | ||
version_series=3 | ||
version_revision=1 | ||
version_revision=2 |