From 69d5d2a4c90136c6f69501565d3fb5108b25b04f Mon Sep 17 00:00:00 2001 From: Scott Killen Date: Mon, 12 Jan 2015 23:25:41 -0500 Subject: [PATCH 1/6] Fix typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 816c4c8..f91aafa 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Scott's Tweaks adds several of my favorite gameplay tweaks to the game. -- Live chickens drop feathers as the go about their lives. +- Live chickens drop feathers as they go about their lives. - Growables (saplings, etc.) plant themselves if possible. [Contributing](#contributing) From 19f48986d5a2d3757384355a88b1f4dea13a6aaf Mon Sep 17 00:00:00 2001 From: Scott Killen Date: Sat, 17 Jan 2015 00:45:27 -0500 Subject: [PATCH 2/6] Update KoreSample version. --- version/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version/gradle.properties b/version/gradle.properties index 4fb450d..8dcd9c5 100644 --- a/version/gradle.properties +++ b/version/gradle.properties @@ -1,7 +1,7 @@ #Mon, 12 Jan 2015 23:08:06 -0500 mcversion=1.7.10 forgeversion=10.13.2.1235 -koreversion=1.2.0 +koreversion=1.2.1 version_major=1 version_series=0 version_revision=0 From 7b661fdad8ba4bb0b3ac87a430cdfe4a16cd1407 Mon Sep 17 00:00:00 2001 From: Scott Killen Date: Sun, 18 Jan 2015 01:10:26 -0500 Subject: [PATCH 3/6] Update KoreSample version. --- README.md | 2 +- version/gradle.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f91aafa..12b0808 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Scott's Tweaks **LATEST OFFICIAL VERSION**: [Scott's Tweaks 1.0.0 for MC 1.7.10][release] ([changelog][changelog.md])
-*DEPENDS ON*: [Kore Sample 1.2.0 (or later) for MC 1.7.10][koresample] +*DEPENDS ON*: [Kore Sample 1.2.2 (or later) for MC 1.7.10][koresample] [release]: https://github.com/MinecraftModArchive/ScottsTweaks/releases/download/v1.0.0/ScottsTweaks-1.7.10-1.0.0.jar [changelog.md]: https://github.com/MinecraftModArchive/Dendrology/blob/develop/src/main/resources/CHANGELOG.md [koresample]: https://github.com/MinecraftModArchive/KoreSample/releases/latest diff --git a/version/gradle.properties b/version/gradle.properties index 8dcd9c5..19bccd3 100644 --- a/version/gradle.properties +++ b/version/gradle.properties @@ -1,7 +1,7 @@ #Mon, 12 Jan 2015 23:08:06 -0500 mcversion=1.7.10 forgeversion=10.13.2.1235 -koreversion=1.2.1 +koreversion=1.2.2 version_major=1 version_series=0 version_revision=0 From 82a7f3b6da5b628efdf48f2a66badf5b442720cc Mon Sep 17 00:00:00 2001 From: Scott Killen Date: Sun, 18 Jan 2015 01:13:28 -0500 Subject: [PATCH 4/6] Add VersionChecker support. --- .../scottkillen/mod/scottstweaks/TheMod.java | 31 +++++++++++++------ .../mod/scottstweaks/config/Settings.java | 11 +++---- .../scottstweaks/config/client/ConfigGUI.java | 2 +- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/scottkillen/mod/scottstweaks/TheMod.java b/src/main/java/com/scottkillen/mod/scottstweaks/TheMod.java index eff2554..293ad42 100644 --- a/src/main/java/com/scottkillen/mod/scottstweaks/TheMod.java +++ b/src/main/java/com/scottkillen/mod/scottstweaks/TheMod.java @@ -4,9 +4,10 @@ import com.google.common.base.Optional; import com.google.common.collect.Lists; import com.scottkillen.mod.koresample.compat.Integrates; +import com.scottkillen.mod.koresample.compat.versionchecker.Versioned; import com.scottkillen.mod.koresample.config.ConfigEventHandler; -import com.scottkillen.mod.scottstweaks.tweaks.chicken.ChickenPlucker; import com.scottkillen.mod.scottstweaks.config.Settings; +import com.scottkillen.mod.scottstweaks.tweaks.chicken.ChickenPlucker; import com.scottkillen.mod.scottstweaks.tweaks.planting.Planter; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -18,18 +19,15 @@ import java.util.List; @SuppressWarnings({ - "StaticNonFinalField", - "WeakerAccess", - "StaticVariableMayNotBeInitialized", - "NonConstantFieldWithUpperCaseName" + "StaticNonFinalField", "WeakerAccess", "StaticVariableMayNotBeInitialized", "NonConstantFieldWithUpperCaseName" }) @Mod(modid = TheMod.MOD_ID, name = TheMod.MOD_NAME, version = TheMod.MOD_VERSION, useMetadata = true, guiFactory = TheMod.MOD_GUI_FACTORY) -public class TheMod +public class TheMod implements Versioned { - public static final String MOD_ID = "scottstweaks"; - public static final String MOD_NAME = "Scott's Tweaks"; - public static final String MOD_VERSION = "${mod_version}"; - public static final String MOD_GUI_FACTORY = "com.scottkillen.mod.scottstweaks.config.client.ModGuiFactory"; + static final String MOD_GUI_FACTORY = "com.scottkillen.mod.scottstweaks.config.client.ModGuiFactory"; + static final String MOD_ID = "scottstweaks"; + static final String MOD_NAME = "Scott's Tweaks"; + static final String MOD_VERSION = "${mod_version}"; @Instance(MOD_ID) public static TheMod INSTANCE; private final List integrators = Lists.newArrayList(); @@ -48,6 +46,7 @@ public void onFMLPreInitialization(FMLPreInitializationEvent event) new ConfigEventHandler(MOD_ID, event.getSuggestedConfigurationFile(), Settings.INSTANCE, Settings.CONFIG_VERSION)); configEventHandler.get().activate(); + com.scottkillen.mod.koresample.TheMod.INSTANCE.addVersionCheck(this); } @SuppressWarnings("MethodMayBeStatic") @@ -58,6 +57,18 @@ public void onFMLInitialization(FMLInitializationEvent unused) new Planter().listen(MinecraftForge.EVENT_BUS); } + @Override + public String modID() + { + return MOD_ID; + } + + @Override + public String versionInfoURL() + { + return "https://raw.githubusercontent.com/ScottKillen/glowing-ninja/master/ScottsTweaks.json"; + } + @Override public String toString() { diff --git a/src/main/java/com/scottkillen/mod/scottstweaks/config/Settings.java b/src/main/java/com/scottkillen/mod/scottstweaks/config/Settings.java index 73ac914..9ab8a6f 100644 --- a/src/main/java/com/scottkillen/mod/scottstweaks/config/Settings.java +++ b/src/main/java/com/scottkillen/mod/scottstweaks/config/Settings.java @@ -25,7 +25,8 @@ public enum Settings implements ConfigSyncable private boolean doHensDropFeathers = true; private boolean doPlantGrowable = true; - private static int get(Configuration config, String settingName, int defaultValue, int minumumValue, int maximumValue) + private static int get(Configuration config, String settingName, int defaultValue, int minumumValue, + int maximumValue) { return config.getInt(settingName, CATEGORY_FEATHER_DROP, defaultValue, minumumValue, maximumValue, getLocalizedComment(settingName)); @@ -38,7 +39,7 @@ private static boolean get(Configuration config, String settingName, String cate private static String getLocalizedComment(String settingName) { - return StatCollector.translateToLocal("config." + TheMod.MOD_ID + ':' + settingName); + return StatCollector.translateToLocal("config." + TheMod.INSTANCE.modID() + ':' + settingName); } @Override @@ -53,13 +54,11 @@ public void convertOldConfig(Configuration oldConfig) public void syncConfig(Configuration config) { chickFeatherQuantity = get(config, "chickFeatherQuantity", chickFeatherQuantity, 1, 10); - chickFeatherRarity = - get(config, "chickFeatherRarity", chickFeatherRarity, 6000, Integer.MAX_VALUE); + chickFeatherRarity = get(config, "chickFeatherRarity", chickFeatherRarity, 6000, Integer.MAX_VALUE); doChicksDropFeathers = get(config, "doChicksDropFeathers", CATEGORY_FEATHER_DROP, doChicksDropFeathers); doHensDropFeathers = get(config, "doHensDropFeathers", CATEGORY_FEATHER_DROP, doHensDropFeathers); henFeatherQuantity = get(config, "henFeatherQuantity", henFeatherQuantity, 1, 10); - henFeatherRarity = - get(config, "henFeatherRarity", henFeatherRarity, 6000, Integer.MAX_VALUE); + henFeatherRarity = get(config, "henFeatherRarity", henFeatherRarity, 6000, Integer.MAX_VALUE); doPlantGrowable = get(config, "doPlantGrowable", CATEGORY_PLANTING, doPlantGrowable); } diff --git a/src/main/java/com/scottkillen/mod/scottstweaks/config/client/ConfigGUI.java b/src/main/java/com/scottkillen/mod/scottstweaks/config/client/ConfigGUI.java index 4c708f3..aa1a3d2 100644 --- a/src/main/java/com/scottkillen/mod/scottstweaks/config/client/ConfigGUI.java +++ b/src/main/java/com/scottkillen/mod/scottstweaks/config/client/ConfigGUI.java @@ -14,7 +14,7 @@ public final class ConfigGUI extends GuiConfig { public ConfigGUI(GuiScreen parent) { - super(parent, getConfigElements(), TheMod.MOD_ID, false, false, + super(parent, getConfigElements(), TheMod.INSTANCE.modID(), false, false, GuiConfig.getAbridgedConfigPath(TheMod.INSTANCE.configuration().toString())); } From a5f7f37826ebff1e4dad6ccde514b1aeadd8c146 Mon Sep 17 00:00:00 2001 From: Scott Killen Date: Sun, 18 Jan 2015 01:15:05 -0500 Subject: [PATCH 5/6] Update Changelog. --- src/main/resources/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/CHANGELOG.md b/src/main/resources/CHANGELOG.md index b0a9a66..c37c9c1 100644 --- a/src/main/resources/CHANGELOG.md +++ b/src/main/resources/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased +- Added support for [Version Checker][vc_url]. +[vc_url]: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2091981-version-checker-auto-update-mods-and-clean + ## 1.0.0 - Added feather drops for live chickens. - Growables (saplings, etc.) plant themselves if possible. From ce176d0565fe227dc9647deae9c751eccfde2f53 Mon Sep 17 00:00:00 2001 From: Scott Killen Date: Sun, 18 Jan 2015 01:17:39 -0500 Subject: [PATCH 6/6] Bump version to 1.0.1 --- README.md | 4 ++-- src/main/resources/CHANGELOG.md | 2 +- version/gradle.properties | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 12b0808..837eadb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## Scott's Tweaks -**LATEST OFFICIAL VERSION**: [Scott's Tweaks 1.0.0 for MC 1.7.10][release] ([changelog][changelog.md])
+**LATEST OFFICIAL VERSION**: [Scott's Tweaks 1.0.1 for MC 1.7.10][release] ([changelog][changelog.md])
*DEPENDS ON*: [Kore Sample 1.2.2 (or later) for MC 1.7.10][koresample] -[release]: https://github.com/MinecraftModArchive/ScottsTweaks/releases/download/v1.0.0/ScottsTweaks-1.7.10-1.0.0.jar +[release]: https://github.com/MinecraftModArchive/ScottsTweaks/releases/download/v1.0.1/ScottsTweaks-1.7.10-1.0.1.jar [changelog.md]: https://github.com/MinecraftModArchive/Dendrology/blob/develop/src/main/resources/CHANGELOG.md [koresample]: https://github.com/MinecraftModArchive/KoreSample/releases/latest diff --git a/src/main/resources/CHANGELOG.md b/src/main/resources/CHANGELOG.md index c37c9c1..d23c005 100644 --- a/src/main/resources/CHANGELOG.md +++ b/src/main/resources/CHANGELOG.md @@ -1,4 +1,4 @@ -## Unreleased +## 1.0.1 - Added support for [Version Checker][vc_url]. [vc_url]: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2091981-version-checker-auto-update-mods-and-clean diff --git a/version/gradle.properties b/version/gradle.properties index 19bccd3..3e1d1f9 100644 --- a/version/gradle.properties +++ b/version/gradle.properties @@ -1,7 +1,7 @@ -#Mon, 12 Jan 2015 23:08:06 -0500 +#Sun, 18 Jan 2015 01:16:11 -0500 mcversion=1.7.10 forgeversion=10.13.2.1235 koreversion=1.2.2 version_major=1 version_series=0 -version_revision=0 +version_revision=1