ddc846d860
- Relevant Mod files - Relevant Classes - Resources - Added Symmetry Wand from TMA
27 lines
685 B
Java
27 lines
685 B
Java
package com.simibubi.create.gui;
|
|
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.client.gui.screen.Screen;
|
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
|
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
|
|
|
|
@EventBusSubscriber
|
|
public class GuiOpener {
|
|
|
|
private static Screen openedGuiNextTick;
|
|
|
|
@SubscribeEvent
|
|
public static void onClientTick(ClientTickEvent event) {
|
|
if (openedGuiNextTick != null) {
|
|
Minecraft.getInstance().displayGuiScreen(openedGuiNextTick);
|
|
openedGuiNextTick = null;
|
|
}
|
|
}
|
|
|
|
public static void open(Screen gui) {
|
|
openedGuiNextTick = gui;
|
|
}
|
|
|
|
}
|