diff --git a/fml/client/cpw/mods/fml/client/modloader/ModLoaderClientHelper.java b/fml/client/cpw/mods/fml/client/modloader/ModLoaderClientHelper.java index 4d3016653c..82636ee3f8 100644 --- a/fml/client/cpw/mods/fml/client/modloader/ModLoaderClientHelper.java +++ b/fml/client/cpw/mods/fml/client/modloader/ModLoaderClientHelper.java @@ -20,7 +20,7 @@ import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; -import com.google.common.base.Equivalences; +import com.google.common.base.Equivalence; import com.google.common.base.Supplier; import com.google.common.base.Suppliers; import com.google.common.collect.Iterables; @@ -73,7 +73,7 @@ public class ModLoaderClientHelper implements IModLoaderSidedHelper FMLLog.log(mc.getModId(), Level.SEVERE, e, "A severe problem was detected with the mod %s during the addRenderer call. Continuing, but expect odd results", mc.getModId()); } - MapDifference, Render> difference = Maps.difference(RenderManager.field_78727_a.field_78729_o, renderers, Equivalences.identity()); + MapDifference, Render> difference = Maps.difference(RenderManager.field_78727_a.field_78729_o, renderers, Equivalence.identity()); for ( Entry, Render> e : difference.entriesOnlyOnLeft().entrySet()) { diff --git a/fml/common/cpw/mods/fml/common/IASMHook.java b/fml/common/cpw/mods/fml/common/IASMHook.java new file mode 100644 index 0000000000..dbfd47b955 --- /dev/null +++ b/fml/common/cpw/mods/fml/common/IASMHook.java @@ -0,0 +1,21 @@ +package cpw.mods.fml.common; + +import org.objectweb.asm.tree.ClassNode; + +public interface IASMHook { + /** + * Inject the {@link Mod} class node into this instance. This allows retrieval from custom + * attributes or other artifacts in your mod class + * + * @param modClassNode The mod class + * @return optionally a code generated class that will be injected into the classloader + */ + ClassNode inject(ClassNode modClassNode); + /** + * Allow mods to manipulate classes loaded from this {@link Mod}'s jar file. The {@link Mod} + * class is always guaranteed to be called first + * + * @param node The class being loaded + */ + void modifyClass(String className, ClassNode node); +} diff --git a/fml/common/cpw/mods/fml/common/Mod.java b/fml/common/cpw/mods/fml/common/Mod.java index 51d753723c..fb80182380 100644 --- a/fml/common/cpw/mods/fml/common/Mod.java +++ b/fml/common/cpw/mods/fml/common/Mod.java @@ -111,6 +111,21 @@ public @interface Mod * @return A certificate fingerprint that is expected for this mod. */ String certificateFingerprint() default ""; + + /** + * The language the mod is authored in. This will be used to control certain libraries being downloaded. + * Valid values are currently "java", "scala" + * + * @return The language the mod is authored in + */ + String modLanguage() default "java"; + /** + * An optional ASM hook class, that can be used to apply ASM to classes loaded from this mod. It is also given + * the ASM tree of the class declaring {@link Mod} to with what it will. + * + * @return The name of a class to be loaded and executed. Must implement {@link IASMHook}. + */ + String asmHookClass() default ""; /** * Mark the designated method as to be called at if there is something wrong with the certificate fingerprint of * the mod's jar, or it is missing, or otherwise a problem. diff --git a/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java b/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java index 303258257a..400ae5b465 100644 --- a/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java +++ b/fml/common/cpw/mods/fml/relauncher/CoreFMLLibraries.java @@ -2,8 +2,8 @@ package cpw.mods.fml.relauncher; public class CoreFMLLibraries implements ILibrarySet { - private static String[] libraries = { "argo-2.25.jar","guava-12.0.1.jar","asm-all-4.0.jar", "bcprov-jdk15on-147.jar" }; - private static String[] checksums = { "bb672829fde76cb163004752b86b0484bd0a7f4b", "b8e78b9af7bf45900e14c6f958486b6ca682195f", "98308890597acb64047f7e896638e0d98753ae82", "b6f5d9926b0afbde9f4dbe3db88c5247be7794bb" }; + private static String[] libraries = { "argo-small-3.2.jar","guava-14.0-rc3.jar","asm-all-4.1.jar", "bcprov-jdk15on-148.jar" }; + private static String[] checksums = { "58912ea2858d168c50781f956fa5b59f0f7c6b51", "931ae21fa8014c3ce686aaa621eae565fefb1a6a", "054986e962b88d8660ae4566475658469595ef58", "960dea7c9181ba0b17e8bab0c06a43f0a5f04e65" }; @Override public String[] getLibraries() @@ -20,7 +20,7 @@ public class CoreFMLLibraries implements ILibrarySet @Override public String getRootURL() { - return "http://files.minecraftforge.net/fmllibs/%s"; + return System.getProperty("fml.core.libraries.mirror", "http://files.minecraftforge.net/fmllibs/%s"); } } diff --git a/fml/eclipse-workspace-dev.zip b/fml/eclipse-workspace-dev.zip index 26a33422b1..dd8d91bdd1 100644 Binary files a/fml/eclipse-workspace-dev.zip and b/fml/eclipse-workspace-dev.zip differ diff --git a/fml/install/fml.py b/fml/install/fml.py index 2f8927c6d1..053cd684eb 100644 --- a/fml/install/fml.py +++ b/fml/install/fml.py @@ -12,7 +12,7 @@ mcp_version = '7.23' def download_deps(mcp_path): ret = True - for lib in ['argo-2.25.jar', 'guava-12.0.1.jar', 'guava-12.0.1-sources.jar', 'asm-all-4.0.jar', 'asm-all-4.0-source.jar', 'bcprov-jdk15on-147.jar']: + for lib in ['argo-3.2-src.jar','guava-14.0-rc3.jar','asm-4.1.tar.gz','asm-debug-all-4.1.jar','bcprov-debug-jdk15on-148.jar','bcprov-jdk15on-148-src.zip','guava-14.0-rc3-sources.jar']: libF = os.path.join(mcp_path, 'lib') if not os.path.isdir(libF): os.makedirs(libF) @@ -24,7 +24,7 @@ def download_deps(mcp_path): urllib.urlretrieve('http://files.minecraftforge.net/fmllibs/' + lib, target) print 'Downloaded %s' % lib except: - print 'Download %s failed, download manually from http://files.minecraftforge.net/fmllibs/%s or http://files.minecraftforge.net/fmllibs/fml_libs_dev.zip and place in MCP/lib' % (lib, lib) + print 'Download %s failed, download manually from http://files.minecraftforge.net/fmllibs/%s or http://files.minecraftforge.net/fmllibs/fml_libs_dev15.zip and place in mcp/lib' % (lib, lib) ret = False return ret