ForgePatch/src/main/java/net/minecraftforge/common/ForgeVersion.java

69 lines
2.1 KiB
Java
Raw Normal View History

/*
* Minecraft Forge
* Copyright (c) 2016-2018.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.common;
2018-06-11 01:12:46 +00:00
import net.minecraftforge.fml.VersionChecker;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.annotation.Nullable;
2018-10-02 04:32:41 +00:00
import static net.minecraftforge.fml.Logging.CORE;
public class ForgeVersion
{
2018-10-02 04:32:41 +00:00
private static final Logger LOGGER = LogManager.getLogger();
2018-06-21 19:37:32 +00:00
// This is Forge's Mod Id, used for the ForgeMod and resource locations
public static final String MOD_ID = "forge";
// This is the minecraft version we're building for - used in various places in Forge/FML code
2018-09-05 00:23:45 +00:00
public static final String mcVersion = "1.13";
// This is the MCP data version we're using
2017-09-18 21:35:45 +00:00
public static final String mcpVersion = "9.42";
2018-10-02 04:32:41 +00:00
private static final String forgeVersion;
2012-10-03 06:00:19 +00:00
2018-10-02 04:32:41 +00:00
static {
String vers = ForgeVersion.class.getPackage().getImplementationVersion();
if (vers == null) {
vers = System.getProperty("forge.version");
}
if (vers == null) throw new RuntimeException("Missing forge version, cannot continue");
forgeVersion = vers;
LOGGER.info(CORE, "Found Forge version {}", forgeVersion);
}
2012-10-03 06:00:19 +00:00
public static String getVersion()
{
2018-10-02 04:32:41 +00:00
return forgeVersion;
}
2018-06-11 01:12:46 +00:00
public static VersionChecker.Status getStatus()
{
2018-06-11 01:12:46 +00:00
return VersionChecker.Status.PENDING;
}
2018-06-11 01:12:46 +00:00
@Nullable
public static String getTarget()
{
2018-06-11 01:12:46 +00:00
return "";
}
}