Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottKillen committed Jan 18, 2015
2 parents 5f3f4b8 + ce176d0 commit 3000ba6
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 24 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
## Scott's Tweaks
**LATEST OFFICIAL VERSION**: [Scott's Tweaks 1.0.0 for MC 1.7.10][release] ([changelog][changelog.md])<br />
*DEPENDS ON*: [Kore Sample 1.2.0 (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
**LATEST OFFICIAL VERSION**: [Scott's Tweaks 1.0.1 for MC 1.7.10][release] ([changelog][changelog.md])<br />
*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.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

![Logo](https://cloud.githubusercontent.com/assets/1509989/5713248/03b7fbb8-9a88-11e4-915f-8d9f18d542d4.png)

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)
Expand Down
31 changes: 21 additions & 10 deletions src/main/java/com/scottkillen/mod/scottstweaks/TheMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<Integrates> integrators = Lists.newArrayList();
Expand All @@ -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")
Expand All @@ -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()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 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

## 1.0.0
- Added feather drops for live chickens.
- Growables (saplings, etc.) plant themselves if possible.
Expand Down
6 changes: 3 additions & 3 deletions version/gradle.properties
Original file line number Diff line number Diff line change
@@ -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.0
koreversion=1.2.2
version_major=1
version_series=0
version_revision=0
version_revision=1

0 comments on commit 3000ba6

Please sign in to comment.