mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Some compatibility fixes for Rei's minimap, and tidy up a couple of things
This commit is contained in:
1 parent
400de1d66e
commit
af06c97efd
6 files changed
+26
-10
No files matched your search
@@ -34,10 +34,12 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseModPr
|
||||
{
|
||||
// CALLBACK MECHANISMS
|
||||
|
||||
private boolean fml_lastWorld = false;
|
||||
|
||||
public final boolean doTickInGame(TickType tick, boolean tickEnd, Object... data)
|
||||
{
|
||||
Minecraft mc = FMLClientHandler.instance().getClient();
|
||||
boolean hasWorld = true;
|
||||
boolean hasWorld = mc.field_71441_e != null;
|
||||
// World and render ticks
|
||||
if (tickEnd && ( tick==TickType.RENDER || tick==TickType.CLIENT ) && hasWorld) {
|
||||
return onTickInGame((Float) data[0], mc);
|
||||
@@ -48,6 +50,16 @@ public abstract class BaseMod implements cpw.mods.fml.common.modloader.BaseModPr
|
||||
public final boolean doTickInGUI(TickType tick, boolean tickEnd, Object... data)
|
||||
{
|
||||
Minecraft mc = FMLClientHandler.instance().getClient();
|
||||
boolean hasWorld = mc.field_71441_e != null;
|
||||
if (!hasWorld && !fml_lastWorld)
|
||||
{
|
||||
fml_lastWorld = true;
|
||||
}
|
||||
else if (!hasWorld && fml_lastWorld)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (tickEnd && ( tick==TickType.RENDER || tick==TickType.CLIENT)) {
|
||||
return onTickInGUI((Float) data[0], mc, mc.field_71462_r);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user