1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-26 01:44:48 +00:00

Add a palette class and use it for rendering

This commit is contained in:
Lignum
2017-05-05 15:24:29 +02:00
parent 09215daa03
commit 936a531cd5
6 changed files with 146 additions and 35 deletions

View File

@@ -10,6 +10,7 @@ import dan200.computercraft.ComputerCraft;
import dan200.computercraft.core.terminal.TextBuffer;
import dan200.computercraft.shared.media.inventory.ContainerHeldItem;
import dan200.computercraft.shared.media.items.ItemPrintout;
import dan200.computercraft.shared.util.Palette;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation;
@@ -204,7 +205,7 @@ public class GuiPrintout extends GuiContainer
int lineIdx = ItemPrintout.LINES_PER_PAGE * m_page + line;
if( lineIdx >= 0 && lineIdx < m_text.length )
{
fontRenderer.drawString( m_text[lineIdx], x, y, m_colours[lineIdx], null, 0, 0, false );
fontRenderer.drawString( m_text[lineIdx], x, y, m_colours[lineIdx], null, 0, 0, false, new Palette() );
}
y = y + FixedWidthFontRenderer.FONT_HEIGHT;
}