}
@SubscribeEvent
public void onRenderTick(RenderTickEvent event)
{
final Minecraft minecraft = FMLClientHandler.instance().getClient();
final EntityPlayerSP player = minecraft.thePlayer;
final EntityClientPlayerMP playerBaseClient = PlayerUtil.getPlayerBaseClientFromPlayer(player, false);
GCPlayerStatsClient stats = null;
if (player != null)
{
stats = GCPlayerStatsClient.get(playerBaseClient);
}
if (event.phase == Phase.END)
{
if (minecraft.currentScreen instanceof GuiIngameMenu)
{
int i = Mouse.getEventX() * minecraft.currentScreen.width / minecraft.displayWidth;
int j = minecraft.currentScreen.height - Mouse.getEventY() * minecraft.currentScreen.height / minecraft.displayHeight - 1;
int k = Mouse.getEventButton();
if (Minecraft.isRunningOnMac && k == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)))
{
k = 1;
}
int deltaColor = 0;
if (i > minecraft.currentScreen.width - 100 && j > minecraft.currentScreen.height - 35)
{
deltaColor = 20;
if (k == 0)
{
if (Mouse.getEventButtonState())
{
minecraft.displayGuiScreen(new GuiNewSpaceRace(playerBaseClient));
}
}
}
this.drawGradientRect(minecraft.currentScreen.width - 100, minecraft.currentScreen.height - 35, minecraft.currentScreen.width, minecraft.currentScreen.height, GCCoreUtil.to32BitColor(150, 10 + deltaColor, 10 + deltaColor, 10 + deltaColor), GCCoreUtil.to32BitColor(250, 10 + deltaColor, 10 + deltaColor, 10 + deltaColor));