Fix version reporting for Forge 1.13.2

This commit is contained in:
Mike Primm 2020-05-03 22:23:32 -05:00
parent 965e2530ec
commit 844c8fef1d
6 changed files with 12 additions and 35 deletions

View File

@ -25,8 +25,8 @@ targetCompatibility = 1.8
ext.buildNumber = System.getenv().BUILD_NUMBER ?: "Dev" ext.buildNumber = System.getenv().BUILD_NUMBER ?: "Dev"
minecraft { minecraft {
mappings channel: 'stable', version: '47-1.13.2' mappings channel: 'stable', version: '47-1.13.2'
runs { runs {
server { server {
workingDirectory project.file('run').canonicalPath workingDirectory project.file('run').canonicalPath
} }
@ -44,12 +44,15 @@ processResources
include 'META-INF/mods.toml' include 'META-INF/mods.toml'
// replace version and mcversion // replace version and mcversion
expand version: project.version + '-' + project.ext.buildNumber expand(
version: project.version + '-' + project.ext.buildNumber,
mcversion: "1.13.2"
)
} }
// copy everything else, thats not the mcmod.info // copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) { from(sourceSets.main.resources.srcDirs) {
include 'META-INF/mods.toml' exclude 'META-INF/mods.toml'
} }
} }

View File

@ -31,6 +31,7 @@ public class DynmapMod
public static DynmapPlugin plugin; public static DynmapPlugin plugin;
public static File jarfile; public static File jarfile;
public static String ver;
public static boolean useforcedchunks; public static boolean useforcedchunks;
public class APICallback extends DynmapCommonAPIListener { public class APICallback extends DynmapCommonAPIListener {
@ -73,6 +74,9 @@ public class DynmapMod
{ {
//TOOO //TOOO
jarfile = ModList.get().getModFileById("dynmap").getFile().getFilePath().toFile(); jarfile = ModList.get().getModFileById("dynmap").getFile().getFilePath().toFile();
ver = ModList.get().getModContainerById("dynmap").get().getModInfo().getVersion().toString();
//// Load configuration file - use suggested (config/WesterosBlocks.cfg) //// Load configuration file - use suggested (config/WesterosBlocks.cfg)
//Configuration cfg = new Configuration(event.getSuggestedConfigurationFile()); //Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
//try { //try {

View File

@ -1430,7 +1430,7 @@ public class DynmapPlugin
/* Inject dependencies */ /* Inject dependencies */
core.setPluginJarFile(DynmapMod.jarfile); core.setPluginJarFile(DynmapMod.jarfile);
core.setPluginVersion(Version.VER); core.setPluginVersion(DynmapMod.ver);
core.setMinecraftVersion(mcver); core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory); core.setDataFolder(dataDirectory);
core.setServer(fserver); core.setServer(fserver);

View File

@ -1,7 +0,0 @@
package org.dynmap.forge_1_13_2;
public class Version {
public static final String VER = "@VERSION@";
public static final String BUILD_NUMBER = "@BUILD_NUMBER@";
}

View File

@ -5,12 +5,7 @@ issueTrackerURL="https://github.com/webbukkit/dynmap/issues"
modId="dynmap" modId="dynmap"
version="${version}" version="${version}"
displayName="Dynmap" displayName="Dynmap"
#updateJSONURL="http://myurl.me/" #optional
#displayURL="http://example.com/" #optional
#logoFile="examplemod.png" #optional
#credits="Thanks for this example mod goes to Java" #optional
authors="mikeprimm" authors="mikeprimm"
# The description text for the mod (multi line!) (#mandatory)
description=''' description='''
Dynamic, Google-maps style rendered maps for your Minecraft server Dynamic, Google-maps style rendered maps for your Minecraft server
''' '''

View File

@ -1,18 +0,0 @@
[
{
"modid": "Dynmap",
"name": "Dynmap",
"description": "Dynamic, Google Maps style web maps for Minecraft Servers",
"version": "${version}",
"mcversion": "${mcversion}",
"url": "https://www.reddit.com/r/Dynmap/",
"updateUrl": "",
"authors": [
"mikeprimm"
],
"credits": "Authored by mikeprimm",
"logoFile": "",
"screenshots": [ ],
"dependencies": []
}
]