Fixed UI background not being drawn.
Mezz removed said displayGuiScreenWithoutClose() so said workaround can be removed.
This commit is contained in:
@@ -35,11 +35,7 @@ import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import mezz.jei.api.IRecipesGui;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.VertexBuffer;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -105,8 +101,6 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
super( container );
|
||||
this.subGui = switchingGuis;
|
||||
switchingGuis = false;
|
||||
// TODO : Remove when mezz removes displayGuiScreenWithoutClose() in 1.12.
|
||||
MinecraftForge.EVENT_BUS.register( this );
|
||||
}
|
||||
|
||||
protected static String join( final Collection<String> toolTip, final String delimiter )
|
||||
@@ -164,6 +158,7 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
@Override
|
||||
public void drawScreen( final int mouseX, final int mouseY, final float btn )
|
||||
{
|
||||
super.drawDefaultBackground();
|
||||
super.drawScreen( mouseX, mouseY, btn );
|
||||
|
||||
for( final Object c : this.buttonList )
|
||||
@@ -587,21 +582,11 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO : Remove when mezz removes displayGuiScreenWithoutClose() in 1.12.
|
||||
public void onGuiOpenEvent(GuiOpenEvent event) { // Why oh why mezz? (RecipesGui.java, displayGuiScreenWithoutClose()
|
||||
if(event.getGui() instanceof IRecipesGui)
|
||||
{
|
||||
subGui = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGuiClosed()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
this.subGui = true; // in case the gui is reopened later ( i'm looking at you NEI )
|
||||
// TODO : Remove when mezz removes displayGuiScreenWithoutClose() in 1.12.
|
||||
MinecraftForge.EVENT_BUS.unregister( this );
|
||||
}
|
||||
|
||||
protected Slot getSlot( final int mouseX, final int mouseY )
|
||||
|
||||
@@ -22,9 +22,6 @@ package appeng.client.gui.implementations;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import mezz.jei.api.IRecipesGui;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
@@ -383,17 +380,6 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
memoryText = this.searchField.getText();
|
||||
}
|
||||
|
||||
// TODO : Remove when mezz removes displayGuiScreenWithoutClose() in 1.12.
|
||||
@Override
|
||||
@SubscribeEvent
|
||||
public void onGuiOpenEvent(GuiOpenEvent event) {
|
||||
super.onGuiOpenEvent(event);
|
||||
if(event.getGui() instanceof IRecipesGui)
|
||||
{
|
||||
memoryText = this.searchField.getText();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG( final int offsetX, final int offsetY, final int mouseX, final int mouseY )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user