mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
Move the version packages somewhere that is now filtered so it doesn't
load twice.
This commit is contained in:
1 parent
978d0ff2e3
commit
ca765b857b
26 files changed
+48
-89
No files matched your search
@@ -32,6 +32,7 @@ import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraftforge.versions.forge.ForgeVersion;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.Marker;
|
||||
|
||||
@@ -20,14 +20,12 @@
|
||||
package net.minecraftforge.common;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import static net.minecraftforge.common.config.Configuration.CATEGORY_CLIENT;
|
||||
import static net.minecraftforge.common.config.Configuration.CATEGORY_GENERAL;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
@@ -36,6 +34,7 @@ import net.minecraftforge.fml.WorldPersistenceHooks;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLModLoadingContext;
|
||||
import net.minecraftforge.server.command.ForgeCommand;
|
||||
import net.minecraftforge.versions.forge.ForgeVersion;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -47,7 +46,6 @@ import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.common.model.animation.CapabilityAnimation;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.fluids.UniversalBucket;
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import net.minecraftforge.fml.VersionChecker;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import static net.minecraftforge.fml.Logging.CORE;
|
||||
|
||||
public class ForgeVersion
|
||||
{
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
// 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
|
||||
public static final String mcVersion = "1.13";
|
||||
// This is the MCP data version we're using
|
||||
public static final String mcpVersion = "9.42";
|
||||
|
||||
private static final String forgeVersion;
|
||||
|
||||
private static final String forgeSpec;
|
||||
|
||||
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");
|
||||
String spec = ForgeVersion.class.getPackage().getSpecificationVersion();
|
||||
if (spec == null) {
|
||||
spec = System.getProperty("forge.spec");
|
||||
}
|
||||
if (spec == null) throw new RuntimeException("Missing forge spec, cannot continue");
|
||||
forgeVersion = vers;
|
||||
forgeSpec = spec;
|
||||
LOGGER.info(CORE, "Found Forge version {}", forgeVersion);
|
||||
LOGGER.info(CORE, "Found Forge spec {}", forgeSpec);
|
||||
}
|
||||
|
||||
public static String getVersion()
|
||||
{
|
||||
return forgeVersion;
|
||||
}
|
||||
|
||||
public static VersionChecker.Status getStatus()
|
||||
{
|
||||
return VersionChecker.Status.PENDING;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getTarget()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String getSpec() {
|
||||
return forgeSpec;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,20 +19,12 @@
|
||||
|
||||
package net.minecraftforge.common;
|
||||
|
||||
import net.minecraftforge.fml.common.ICrashCallable;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.crash.ICrashReportDetail;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeHooks.SeedEntry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.versions.forge.ForgeVersion;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.Marker;
|
||||
|
||||
Reference in new issue
Block a user