Fix missing null checks in ForgeIngameGui (#6907)
This commit is contained in:
parent
68ea1b654c
commit
df57e0a1ba
1 changed files with 8 additions and 5 deletions
|
@ -695,7 +695,7 @@ public class ForgeIngameGui extends IngameGui
|
||||||
|
|
||||||
protected void renderTitle(int width, int height, float partialTicks, MatrixStack mStack)
|
protected void renderTitle(int width, int height, float partialTicks, MatrixStack mStack)
|
||||||
{
|
{
|
||||||
if (titlesTimer > 0)
|
if (displayedTitle != null && titlesTimer > 0)
|
||||||
{
|
{
|
||||||
mc.getProfiler().startSection("titleAndSubtitle");
|
mc.getProfiler().startSection("titleAndSubtitle");
|
||||||
float age = (float)this.titlesTimer - partialTicks;
|
float age = (float)this.titlesTimer - partialTicks;
|
||||||
|
@ -721,10 +721,13 @@ public class ForgeIngameGui extends IngameGui
|
||||||
int l = opacity << 24 & -16777216;
|
int l = opacity << 24 & -16777216;
|
||||||
this.getFontRenderer().func_238407_a_(mStack, this.displayedTitle, (float)(-this.getFontRenderer().func_238414_a_(this.displayedTitle) / 2), -10.0F, 16777215 | l);
|
this.getFontRenderer().func_238407_a_(mStack, this.displayedTitle, (float)(-this.getFontRenderer().func_238414_a_(this.displayedTitle) / 2), -10.0F, 16777215 | l);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
if (this.displayedSubTitle != null)
|
||||||
|
{
|
||||||
RenderSystem.pushMatrix();
|
RenderSystem.pushMatrix();
|
||||||
RenderSystem.scalef(2.0F, 2.0F, 2.0F);
|
RenderSystem.scalef(2.0F, 2.0F, 2.0F);
|
||||||
this.getFontRenderer().func_238407_a_(mStack, this.displayedSubTitle, (float)(-this.getFontRenderer().func_238414_a_(this.displayedSubTitle) / 2), 5.0F, 16777215 | l);
|
this.getFontRenderer().func_238407_a_(mStack, this.displayedSubTitle, (float)(-this.getFontRenderer().func_238414_a_(this.displayedSubTitle) / 2), 5.0F, 16777215 | l);
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
|
}
|
||||||
RenderSystem.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
RenderSystem.popMatrix();
|
RenderSystem.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue