Added formatting support for status messages (#4925)

This commit is contained in:
Kristiāns Micītis 2018-05-17 10:41:21 +03:00 committed by LexManos
parent 330a9c4fd3
commit fc1877dd96
1 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,7 @@ import net.minecraft.util.FoodStats;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
@ -348,6 +349,12 @@ public class GuiIngameForge extends GuiIngame
post(HOTBAR);
}
@Override
public void setOverlayMessage(ITextComponent component, boolean animateColor)
{
this.setOverlayMessage(component.getFormattedText(), animateColor);
}
protected void renderAir(int width, int height)
{
if (pre(AIR)) return;