@SubscribeEvent public void onTick(RenderTickEvent t) { GuiScreen screen = Minecraft.getMinecraft().currentScreen; if (screen instanceof GuiMainMenu) { screen.drawCenteredString( Minecraft.getMinecraft().fontRendererObj, StatCollector.translateToLocal("ias.loggedinas") + Minecraft.getMinecraft().getSession().getUsername() + ".", screen.width / 2, screen.height / 4 + 48 + 72 + 12 + 22, 0xFFCC8888); } }
public void drawCenteredString( String p_154325_1_, int p_154325_2_, int p_154325_3_, int p_154325_4_) { super.drawCenteredString( this.fontRendererObj, p_154325_1_, p_154325_2_, p_154325_3_, p_154325_4_); }