diff --git a/fml/client/cpw/mods/fml/client/FMLClientHandler.java b/fml/client/cpw/mods/fml/client/FMLClientHandler.java index 90d758a6d..dedf41f49 100644 --- a/fml/client/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/client/cpw/mods/fml/client/FMLClientHandler.java @@ -51,6 +51,7 @@ import net.minecraft.src.Packet; import net.minecraft.src.Packet1Login; import net.minecraft.src.Packet250CustomPayload; import net.minecraft.src.Packet3Chat; +import net.minecraft.src.Profiler; import net.minecraft.src.Render; import net.minecraft.src.RenderBlocks; import net.minecraft.src.RenderEngine; @@ -829,4 +830,14 @@ public class FMLClientHandler implements IFMLSidedHandler } animationSet.add(info); } + + @Override + public void profileStart(String profileLabel) { + Profiler.func_40663_a(profileLabel); + } + + @Override + public void profileEnd() { + Profiler.func_40662_b(); + } } diff --git a/fml/client/net/minecraft/src/ModLoader.java b/fml/client/net/minecraft/src/ModLoader.java index 26bc93a63..4b099a330 100644 --- a/fml/client/net/minecraft/src/ModLoader.java +++ b/fml/client/net/minecraft/src/ModLoader.java @@ -34,7 +34,8 @@ import cpw.mods.fml.common.modloader.ModLoaderModContainer; public class ModLoader { // TODO dirty workaround for millinaire - public static final Map> languageProperties=Collections.emptyMap(); + @Deprecated + public static final Map> localizedStrings=Collections.emptyMap(); /** * Not used on the server. * diff --git a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java index 72fb5cecc..991b10d0e 100644 --- a/fml/common/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/common/cpw/mods/fml/common/FMLCommonHandler.java @@ -108,26 +108,42 @@ public class FMLCommonHandler public void tickStart(TickType type, Object ... data) { + sidedDelegate.profileStart("modTickStart"); + sidedDelegate.profileStart(type.name()); for (ModContainer mod : Loader.getModList()) { + sidedDelegate.profileStart(mod.getName()); mod.tickStart(type, data); + sidedDelegate.profileEnd(); } for (ModContainer mod : auxilliaryContainers) { + sidedDelegate.profileStart(mod.getMod().getClass().getSimpleName()); mod.tickStart(type, data); + sidedDelegate.profileEnd(); } + sidedDelegate.profileEnd(); + sidedDelegate.profileEnd(); } public void tickEnd(TickType type, Object ... data) { + sidedDelegate.profileStart("modTickEnd"); + sidedDelegate.profileStart(type.name()); for (ModContainer mod : Loader.getModList()) { + sidedDelegate.profileStart(mod.getName()); mod.tickEnd(type, data); + sidedDelegate.profileEnd(); } for (ModContainer mod : auxilliaryContainers) { + sidedDelegate.profileStart(mod.getMod().getClass().getSimpleName()); mod.tickEnd(type, data); + sidedDelegate.profileEnd(); } + sidedDelegate.profileEnd(); + sidedDelegate.profileEnd(); } public List gatherKeyBindings() { diff --git a/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java b/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java index bf33364d9..d02a8f71d 100644 --- a/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java +++ b/fml/common/cpw/mods/fml/common/IFMLSidedHandler.java @@ -18,4 +18,6 @@ public interface IFMLSidedHandler Properties getCurrentLanguageTable(); String getObjectName(Object minecraftObject); ModMetadata readMetadataFrom(InputStream input, ModContainer mod) throws Exception; + void profileStart(String profileLabel); + void profileEnd(); }