Fixed clearing of the search bar when looking at recipes

Why mezz why...
This commit is contained in:
Gunther De Wachter
2017-06-29 10:30:14 +02:00
parent 2f1f19bbb3
commit 3f7051ec8e
2 changed files with 20 additions and 0 deletions
@@ -35,6 +35,10 @@ 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.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
@@ -101,6 +105,7 @@ public abstract class AEBaseGui extends GuiContainer
super( container );
this.subGui = switchingGuis;
switchingGuis = false;
MinecraftForge.EVENT_BUS.register( this );
}
protected static String join( final Collection<String> toolTip, final String delimiter )
@@ -581,6 +586,14 @@ public abstract class AEBaseGui extends GuiContainer
return false;
}
@SubscribeEvent
public void onGuiOpenEvent(GuiOpenEvent event) { // Why oh why mezz? (RecipesGui.java, displayGuiScreenWithoutClose()
if(event.getGui() instanceof IRecipesGui)
{
subGui = true;
}
}
@Override
public void onGuiClosed()
{