Skip to content

Commit

Permalink
Fix dependencies, readd mcmod.info
Browse files Browse the repository at this point in the history
  • Loading branch information
srs-bsns committed Oct 24, 2016
1 parent 6097512 commit 99f0cd0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
7 changes: 3 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'

sourceCompatibility = targetCompatibility = 1.8

def parseprops(File cfg) {
static def parseprops(File cfg) {
cfg.withReader {
def prop = new Properties()
prop.load(it)
Expand All @@ -23,7 +23,6 @@ def parseprops(File cfg) {
}

ext.ref = parseprops(file('build.properties'))
ext.ref.mod_deps = parseprops(file('mod_deps.properties'))

group = ref.package_base + '.' + ref.mod_id
archivesBaseName = (ref.mod_name as String) + '-' + (ref.mc_version as String)
Expand All @@ -43,8 +42,8 @@ minecraft {
replace '@MOD_VERSION@', project.version
replace '0.0-MCF+MINVER', ref.mcf_minver
replace '9001.0-MCF+MAXVER', ref.mcf_maxver
if (ref.mod_deps!="") replace ';after:MODDEPS', ";" + (ref.mod_deps.depstring as String)
else replace ';after:MODDEPS', ''
replace '0.0-RTG+MINVER', ref.rtg_minver
replace '9001.0-RTG+MINVER', ref.rtg_maxver
replaceIn 'ModInfo.java'
}

Expand Down
2 changes: 2 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ mod_url=https://github.com/Team-RTG/Appalachia
mod_author="Team RTG"
mod_creds=
mod_logo=assets/appalachia/logo.png
rtg_minver=4.1.1.3
rtg_maxver=
mcf_version=12.18.1.2094
mcf_minver=12.18.1.2011
mcf_maxver=
Expand Down
10 changes: 0 additions & 10 deletions mod_deps.properties

This file was deleted.

14 changes: 7 additions & 7 deletions src/main/java/appalachia/Appalachia.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
import appalachia.rtg.config.ConfigManagerAPL;
import appalachia.rtg.world.biome.realistic.appalachia.RealisticBiomeAPLBase;
import appalachia.world.AppalachiaWorldGenerator;
import static appalachia.reference.ModInfo.*;
import appalachia.reference.ModInfo;


@SuppressWarnings({"WeakerAccess", "unused"})
@Mod(
modid = MOD_ID,
name = MOD_NAME,
version = MOD_VERSION,
dependencies = "required-after:Forge@[" + MCF_MINVER + "," + MCF_MAXVER + ")" + MOD_DEPS,
modid = ModInfo.MOD_ID,
name = ModInfo.MOD_NAME,
version = ModInfo.MOD_VERSION,
dependencies = "required-after:Forge@[" + ModInfo.MCF_MINVER + "," + ModInfo.MCF_MAXVER + ");required-after:RTG@[" + ModInfo.RTG_MINVER + "," + ModInfo.RTG_MAXVER + ")",
acceptableRemoteVersions = "*"
)
public class Appalachia {

@Instance(MOD_ID)
@Instance(ModInfo.MOD_ID)
public static Appalachia instance;
public static String configPath;
public static EventManager eventMgr;
Expand All @@ -51,7 +51,7 @@ public void initPre(FMLPreInitializationEvent event) {

instance = this;

configPath = event.getModConfigurationDirectory() + File.separator + CONFIG_DIRECTORY + File.separator;
configPath = event.getModConfigurationDirectory() + File.separator + ModInfo.CONFIG_DIRECTORY + File.separator;
ConfigManager.init(configPath);

BlockManager.registerBlocks();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/appalachia/reference/ModInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class ModInfo
public static final String MOD_VERSION = "@MOD_VERSION@";
public static final String MCF_MINVER = "0.0-MCF+MINVER";
public static final String MCF_MAXVER = "9001.0-MCF+MAXVER";
public static final String MOD_DEPS = ";after:MODDEPS";
public static final String RTG_MINVER = "0.0-RTG+MINVER";
public static final String RTG_MAXVER = "9001.0-RTG+MINVER";
public static final String CONFIG_DIRECTORY = MOD_NAME;
}
14 changes: 14 additions & 0 deletions src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[{
"modid": "${modid}",
"name": "${name}",
"description": "${description}",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "${url}",
"updateUrl": "",
"authorList": [${authorList}],
"credits": "${credits}",
"logoFile": "${logoFile}",
"screenshots": [],
"dependencies": []
}]

0 comments on commit 99f0cd0

Please sign in to comment.