Fix up some deprecation warnings, and clean up coremod code that's going
away.
This commit is contained in:
parent
d648514a90
commit
aaaffda3f0
5 changed files with 9 additions and 57 deletions
|
@ -626,6 +626,7 @@ public class ModLoader
|
|||
*
|
||||
* @param block
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void registerBlock(Block block)
|
||||
{
|
||||
GameRegistry.registerBlock(block);
|
||||
|
@ -637,6 +638,7 @@ public class ModLoader
|
|||
* @param block
|
||||
* @param itemclass
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass)
|
||||
{
|
||||
GameRegistry.registerBlock(block, itemclass);
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
* Forge Mod Loader
|
||||
* Copyright (c) 2012-2013 cpw.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
||||
package cpw.mods.fml.relauncher;
|
||||
|
||||
public class CoreFMLLibraries implements ILibrarySet
|
||||
{
|
||||
private static String[] libraries = { "argo-small-3.2.jar","guava-14.0-rc3.jar","asm-all-4.1.jar", "bcprov-jdk15on-148.jar", FMLInjectionData.debfuscationDataName(), "scala-library.jar" };
|
||||
private static String[] checksums = { "58912ea2858d168c50781f956fa5b59f0f7c6b51", "931ae21fa8014c3ce686aaa621eae565fefb1a6a", "054986e962b88d8660ae4566475658469595ef58", "960dea7c9181ba0b17e8bab0c06a43f0a5f04e65", FMLInjectionData.deobfuscationDataHash, "458d046151ad179c85429ed7420ffb1eaf6ddf85" };
|
||||
|
||||
@Override
|
||||
public String[] getLibraries()
|
||||
{
|
||||
return libraries;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getHashes()
|
||||
{
|
||||
return checksums;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRootURL()
|
||||
{
|
||||
return System.getProperty("fml.core.libraries.mirror", "http://files.minecraftforge.net/fmllibs/%s");
|
||||
}
|
||||
|
||||
}
|
|
@ -49,7 +49,6 @@ public class CoreModManager
|
|||
private static List<String> loadedLibraries = new ArrayList<String>();
|
||||
private static Map<IFMLLoadingPlugin, File> pluginLocations;
|
||||
private static List<IFMLLoadingPlugin> loadPlugins;
|
||||
private static List<ILibrarySet> libraries;
|
||||
private static boolean deobfuscatedEnvironment;
|
||||
|
||||
public static void handleLaunch(File mcDir, LaunchClassLoader classLoader)
|
||||
|
@ -117,13 +116,6 @@ public class CoreModManager
|
|||
}
|
||||
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
|
||||
loadPlugins.add(plugin);
|
||||
if (plugin.getLibraryRequestClass()!=null)
|
||||
{
|
||||
for (String libName : plugin.getLibraryRequestClass())
|
||||
{
|
||||
libraries.add((ILibrarySet) Class.forName(libName, true, classLoader).newInstance());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
|
@ -131,7 +123,7 @@ public class CoreModManager
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
discoverCoreMods(mcDir, classLoader, loadPlugins, libraries);
|
||||
discoverCoreMods(mcDir, classLoader, loadPlugins);
|
||||
|
||||
for (IFMLLoadingPlugin plug : loadPlugins)
|
||||
{
|
||||
|
@ -204,7 +196,7 @@ public class CoreModManager
|
|||
}
|
||||
}
|
||||
|
||||
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader, List<IFMLLoadingPlugin> loadPlugins, List<ILibrarySet> libraries)
|
||||
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader, List<IFMLLoadingPlugin> loadPlugins)
|
||||
{
|
||||
FMLRelaunchLog.fine("Discovering coremods");
|
||||
File coreMods = setupCoreModDir(mcDir);
|
||||
|
@ -308,13 +300,6 @@ public class CoreModManager
|
|||
IFMLLoadingPlugin plugin = (IFMLLoadingPlugin) coreModClass.newInstance();
|
||||
loadPlugins.add(plugin);
|
||||
pluginLocations .put(plugin, coreMod);
|
||||
if (plugin.getLibraryRequestClass()!=null)
|
||||
{
|
||||
for (String libName : plugin.getLibraryRequestClass())
|
||||
{
|
||||
libraries.add((ILibrarySet) Class.forName(libName, true, classLoader).newInstance());
|
||||
}
|
||||
}
|
||||
FMLRelaunchLog.fine("Loaded coremod %s", coreMod.getName());
|
||||
}
|
||||
catch (ClassNotFoundException cnfe)
|
||||
|
|
|
@ -16,10 +16,11 @@ import java.util.Map;
|
|||
|
||||
public class FMLCorePlugin implements IFMLLoadingPlugin
|
||||
{
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public String[] getLibraryRequestClass()
|
||||
{
|
||||
return new String[] {"cpw.mods.fml.relauncher.CoreFMLLibraries"};
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* are made available under the terms of the GNU Lesser Public License v2.1
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* cpw - implementation
|
||||
*/
|
||||
|
@ -15,10 +15,12 @@ package cpw.mods.fml.relauncher;
|
|||
/**
|
||||
* Interface for certain core plugins to register libraries to
|
||||
* be loaded in by the FML class loader at launch time
|
||||
* Deprecated without replacement.
|
||||
*
|
||||
* @author cpw
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ILibrarySet
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue