Fixed JEI clearing the search bar. That last commit was pushed a bit too hastily.

This commit is contained in:
Gunther De Wachter
2017-06-29 10:39:49 +02:00
parent 3f7051ec8e
commit d3bb71d834
2 changed files with 7 additions and 3 deletions
@@ -38,7 +38,6 @@ import com.google.common.collect.Lists;
import mezz.jei.api.IRecipesGui; import mezz.jei.api.IRecipesGui;
import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@@ -586,7 +585,6 @@ public abstract class AEBaseGui extends GuiContainer
return false; return false;
} }
@SubscribeEvent
public void onGuiOpenEvent(GuiOpenEvent event) { // Why oh why mezz? (RecipesGui.java, displayGuiScreenWithoutClose() public void onGuiOpenEvent(GuiOpenEvent event) { // Why oh why mezz? (RecipesGui.java, displayGuiScreenWithoutClose()
if(event.getGui() instanceof IRecipesGui) if(event.getGui() instanceof IRecipesGui)
{ {
@@ -22,7 +22,9 @@ package appeng.client.gui.implementations;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import mezz.jei.api.IRecipesGui;
import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
@@ -382,9 +384,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
} }
@Override @Override
@SubscribeEvent
public void onGuiOpenEvent(GuiOpenEvent event) { public void onGuiOpenEvent(GuiOpenEvent event) {
super.onGuiOpenEvent(event); super.onGuiOpenEvent(event);
memoryText = this.searchField.getText(); if(event.getGui() instanceof IRecipesGui)
{
memoryText = this.searchField.getText();
}
} }
@Override @Override