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"
minecraft {
mappings channel: 'stable', version: '47-1.13.2'
runs {
mappings channel: 'stable', version: '47-1.13.2'
runs {
server {
workingDirectory project.file('run').canonicalPath
}
@ -44,12 +44,15 @@ processResources
include 'META-INF/mods.toml'
// 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
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 File jarfile;
public static String ver;
public static boolean useforcedchunks;
public class APICallback extends DynmapCommonAPIListener {
@ -73,6 +74,9 @@ public class DynmapMod
{
//TOOO
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)
//Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
//try {

View File

@ -1430,7 +1430,7 @@ public class DynmapPlugin
/* Inject dependencies */
core.setPluginJarFile(DynmapMod.jarfile);
core.setPluginVersion(Version.VER);
core.setPluginVersion(DynmapMod.ver);
core.setMinecraftVersion(mcver);
core.setDataFolder(dataDirectory);
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"
version="${version}"
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"
# The description text for the mod (multi line!) (#mandatory)
description='''
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": []
}
]