DimDoors/StevenDimDoors/mod_pocketDimClient/ClientTickHandler.java
SenseiKiwi 1a50aa2290 Minor Changes
Minor changes: removed unused imports and random blocks of whitespace
2013-09-03 19:31:19 -04:00

65 lines
No EOL
1.6 KiB
Java

package StevenDimDoors.mod_pocketDimClient;
import java.util.EnumSet;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import cpw.mods.fml.common.ITickHandler;
import cpw.mods.fml.common.TickType;
public class ClientTickHandler implements ITickHandler
{
@Override
public void tickStart(EnumSet<TickType> type, Object... tickData) {}
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData)
{
if (type.equals(EnumSet.of(TickType.RENDER)))
{
onRenderTick();
}
else if (type.equals(EnumSet.of(TickType.CLIENT)))
{
GuiScreen guiscreen = Minecraft.getMinecraft().currentScreen;
if (guiscreen != null)
{
onTickInGUI(guiscreen);
} else {
onTickInGame();
}
}
}
@Override
public EnumSet<TickType> ticks()
{
return EnumSet.of(TickType.RENDER, TickType.CLIENT);
// In my testing only RENDER, CLIENT, & PLAYER did anything on the client side.
// Read 'cpw.mods.fml.common.TickType.java' for a full list and description of available types
}
@Override
public String getLabel() { return null; }
public void onRenderTick()
{
//System.out.println("onRenderTick");
//TODO: Your Code Here
}
public void onTickInGUI(GuiScreen guiscreen)
{
//System.out.println("onTickInGUI");
//TODO: Your Code Here
}
public void onTickInGame()
{
//System.out.println("onTickInGame");
//TODO: Your Code Here
}
}