Skip to content

Commit 23883fc

Browse files
committed
Allow clientcommands to load in any 1.12 version
1 parent 88390bb commit 23883fc

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ buildscript {
99
}
1010
apply plugin: 'net.minecraftforge.gradle.forge'
1111

12-
1312
version = "1.12.2-20180304-snapshot"
1413
group = "net.earthcomputer.clientcommands"
1514
archivesBaseName = "clientcommands"
@@ -32,6 +31,9 @@ minecraft {
3231
runDir = "run"
3332

3433
mappings = "snapshot_20171003"
34+
35+
replace '${version}', project.version
36+
replace '${mcversion}', project.minecraft.version
3537
}
3638

3739
processResources {
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package net.earthcomputer.clientcommands;
2+
3+
public class BuildConstants {
4+
5+
public static final String VERSION = "${version}";
6+
public static final String BUILD_MC_VERSION = "${mcversion}";
7+
8+
}

src/main/java/net/earthcomputer/clientcommands/ClientCommandsMod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
import net.minecraftforge.fml.common.network.NetworkCheckHandler;
2828
import net.minecraftforge.fml.relauncher.Side;
2929

30-
@Mod(modid = ClientCommandsMod.MODID, version = ClientCommandsMod.VERSION, clientSideOnly = true)
30+
@Mod(modid = ClientCommandsMod.MODID, version = ClientCommandsMod.VERSION, clientSideOnly = true, acceptedMinecraftVersions = "[1.12,1.13)")
3131
public class ClientCommandsMod {
3232
public static final String MODID = "clientcommands";
33-
public static final String VERSION = "1.0.1.20180304";
33+
public static final String VERSION = BuildConstants.VERSION;
3434

3535
@Instance(MODID)
3636
public static ClientCommandsMod INSTANCE;

0 commit comments

Comments
 (0)