Fix millinaire support. Fix Portal eating rendering time. add in profile visibility for mod stuff.

This commit is contained in:
Christian Weeks 2012-05-14 11:38:54 -04:00
parent 6f6c3ee939
commit 028fc2505b
4 changed files with 31 additions and 1 deletions

View file

@ -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();
}
}

View file

@ -34,7 +34,8 @@ import cpw.mods.fml.common.modloader.ModLoaderModContainer;
public class ModLoader
{
// TODO dirty workaround for millinaire
public static final Map<String,Map<String,String>> languageProperties=Collections.emptyMap();
@Deprecated
public static final Map<String,Map<String,String>> localizedStrings=Collections.emptyMap();
/**
* Not used on the server.
*

View file

@ -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<IKeyHandler> gatherKeyBindings() {

View file

@ -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();
}