Fix unwanted lighting changes made by drawHoveringText

This commit is contained in:
pupnewfster committed 2019-07-14 01:09:00 -04:00
1 parent 8e90b39d52
commit fbdc201d40
3 files changed
+4 -6

No files matched your search

@@ -133,11 +133,15 @@ public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper {
@Override
public void displayTooltip(String s, int x, int y) {
drawHoveringText(s, x, y);
//Fix unwanted lighting changes made by drawHoveringText
RenderHelper.disableStandardItemLighting();
}
@Override
public void displayTooltips(List<String> list, int xAxis, int yAxis) {
drawHoveringText(list, xAxis, yAxis);
//Fix unwanted lighting changes made by drawHoveringText
RenderHelper.disableStandardItemLighting();
}
@Override
@@ -97,10 +97,6 @@ public class GuiTransporterConfig extends GuiMekanismTile<TileEntityContainerBlo
}
}
private boolean overSide(int xAxis, int yAxis, int x, int y) {
return xAxis >= x && xAxis <= x + 14 && yAxis >= y && yAxis <= y + 14;
}
@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
String text = LangUtils.localize("gui.configuration.transporter");
@@ -130,8 +130,6 @@ public class GuiScrollList extends GuiElement {
@Override
public void renderForeground(int xAxis, int yAxis) {
//TODO: For some reason the entire gui scroll list element gets its color shifted when GuiScreen#drawHoveringText is being drawn
// Resetting the color here does not seem to do anything to help fix this
if (!textEntries.isEmpty()) {
for (int i = 0; i < size; i++) {
int index = getScrollIndex() + i;