Merge branch 'master', remote-tracking branch 'origin' into bukkit
This commit is contained in:
commit
a6d6b739bd
7 changed files with 22 additions and 16 deletions
|
@ -245,9 +245,9 @@ public class FMLCommonHandler
|
|||
* @param canonicalPath
|
||||
* @return
|
||||
*/
|
||||
public ModContainer loadBaseModMod(Class<?> clazz, String canonicalPath)
|
||||
public ModContainer loadBaseModMod(Class<?> clazz, File canonicalFile)
|
||||
{
|
||||
return sidedDelegate.loadBaseModMod(clazz, canonicalPath);
|
||||
return sidedDelegate.loadBaseModMod(clazz, canonicalFile);
|
||||
}
|
||||
|
||||
public File getMinecraftRootDirectory() {
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*/
|
||||
package cpw.mods.fml.common;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -19,9 +20,13 @@ public class FMLModContainer implements ModContainer
|
|||
{
|
||||
private Mod modDescriptor;
|
||||
private Object modInstance;
|
||||
private String source;
|
||||
private File source;
|
||||
|
||||
public FMLModContainer(String source)
|
||||
public FMLModContainer(String dummy)
|
||||
{
|
||||
this(new File(dummy));
|
||||
}
|
||||
public FMLModContainer(File source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
@ -106,7 +111,7 @@ public class FMLModContainer implements ModContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSource()
|
||||
public File getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
@ -229,7 +234,7 @@ public class FMLModContainer implements ModContainer
|
|||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getSource();
|
||||
return getSource().getName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
|
@ -8,7 +8,7 @@ public interface IFMLSidedHandler
|
|||
Logger getMinecraftLogger();
|
||||
File getMinecraftRootDirectory();
|
||||
boolean isModLoaderMod(Class<?> clazz);
|
||||
ModContainer loadBaseModMod(Class<?> clazz, String canonicalPath);
|
||||
ModContainer loadBaseModMod(Class<?> clazz, File canonicalFile);
|
||||
boolean isServer();
|
||||
boolean isClient();
|
||||
}
|
||||
|
|
|
@ -447,7 +447,7 @@ public class Loader
|
|||
else if (FMLCommonHandler.instance().isModLoaderMod(clazz))
|
||||
{
|
||||
log.fine(String.format("ModLoader BaseMod class %s found, loading", clazzName));
|
||||
ModContainer mc = FMLCommonHandler.instance().loadBaseModMod(clazz, classSource.getCanonicalPath());
|
||||
ModContainer mc = FMLCommonHandler.instance().loadBaseModMod(clazz, classSource.getCanonicalFile());
|
||||
mods.add(mc);
|
||||
log.fine(String.format("ModLoader BaseMod class %s loaded", clazzName));
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
package cpw.mods.fml.common;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -69,10 +70,10 @@ public interface ModContainer
|
|||
*/
|
||||
boolean matches(Object mod);
|
||||
/**
|
||||
* The source of this mod: usually the file name on the file system
|
||||
* The source of this mod: the file on the file system
|
||||
* @return
|
||||
*/
|
||||
String getSource();
|
||||
File getSource();
|
||||
/**
|
||||
* The actual mod object itself
|
||||
* @return
|
||||
|
|
|
@ -185,11 +185,11 @@ public class FMLServerHandler implements IFMLSidedHandler
|
|||
/**
|
||||
* Load the supplied mod class into a mod container
|
||||
*/
|
||||
public ModContainer loadBaseModMod(Class<?> clazz, String canonicalPath)
|
||||
public ModContainer loadBaseModMod(Class<?> clazz, File canonicalFile)
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
Class <? extends BaseMod > bmClazz = (Class <? extends BaseMod >) clazz;
|
||||
return new ModLoaderModContainer(bmClazz, canonicalPath);
|
||||
return new ModLoaderModContainer(bmClazz, canonicalFile);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,11 +43,11 @@ public class ModLoaderModContainer implements ModContainer
|
|||
private Class <? extends BaseMod > modClazz;
|
||||
private BaseMod mod;
|
||||
private boolean isTicking;
|
||||
private String modSource ;
|
||||
private File modSource ;
|
||||
private ArrayList<String> dependencies;
|
||||
private ArrayList<String> preDependencies;
|
||||
private ArrayList<String> postDependencies;
|
||||
public ModLoaderModContainer(Class <? extends BaseMod > modClazz, String modSource)
|
||||
public ModLoaderModContainer(Class <? extends BaseMod > modClazz, File modSource)
|
||||
{
|
||||
this.modClazz = modClazz;
|
||||
this.modSource = modSource;
|
||||
|
@ -334,7 +334,7 @@ public class ModLoaderModContainer implements ModContainer
|
|||
}
|
||||
|
||||
@Override
|
||||
public String getSource()
|
||||
public File getSource()
|
||||
{
|
||||
return modSource;
|
||||
}
|
||||
|
@ -475,7 +475,7 @@ public class ModLoaderModContainer implements ModContainer
|
|||
|
||||
public String toString()
|
||||
{
|
||||
return modSource;
|
||||
return modSource.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue