-
Cancel Escape
Hello, I would like to cancel the opening of the GuiIngamePause menu according to a condition. But InputEvent.KeyInputEvent can't canceled. Mycode : @SubscribeEvent public void onKey(final InputEvent.KeyInputEvent event) { if(Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) { if(cancel){ //need to cancel } } }
-
[Solved] open the pause menu over a GUI
thx you so much the solution public GuiCreationStartup guiLogin; public boolean login = false; @SubscribeEvent public void onOpenGui(GuiOpenEvent event) { if(event.getGui() instanceof GuiCreationStartup) { this.guiLogin = (GuiCreationStartup) event.getGui(); } if(event.getGui() instanceof GuiIngameMenu && this.guiLogin != null) { this.login = true; } if(event.getGui() == null && this.login) { Minecraft.getMinecraft().displayGuiScreen(this.guiLogin); this.guiLogin = null; this.login = false; } }
-
[Solved] open the pause menu over a GUI
I don't understand how to detect when the gui is closed with GuiOpenEvent. I do this : public class ClientEventHandler { public GuiCreationStartup guiLogin = null; @SubscribeEvent public void onOpenGui(GuiOpenEvent event) { if(event.getGui() instanceof GuiCreationStartup) { this.guiLogin = (GuiCreationStartup) event.getGui(); } if(event.getGui() instanceof GuiIngameMenu && this.guiLogin != null) { //Need to detect IngameMenu close } } }
-
[Solved] open the pause menu over a GUI
How to detect if the GuiIngameMenu is closed and my GUI was open before?
-
[Solved] open the pause menu over a GUI
Hello, I created a GUI that the player has to complete when he logs in for the first time. I would like that when the player presses "escape", the pause menu appears but without removing my GUI. I have this to detect "escape" pressed @Override public void keyTyped(char c, int i) { if (i == 1) { } else { super.keyTyped(c, i); } }
-
LayerRenderer not visible
Hello, It's me again, I'm sorry for ask many help, but I start with forge. So I need to get LayerRenderer for check if it's instanceof to my LayerPlayer but I don't have acces to layerRenderers in this line "final List<? extends LayerRenderer> list = render.layerRenderers;". Eclipse sayed me "The field RenderLivingBase<AbstractClientPlayer>.layerRenderers is not visible". MyCode.java
-
[1.12] Open GuiScreen on connect
Ty for information, but do you have an exemple to use packet (I never used this before)
-
[1.12] Open GuiScreen on connect
I used IGuiHandler because I read EntityJoinWorldEvent it's a server event and GuiScreen it's only client (so it's for this reason I used player.openGui) This Gui show a menu for choose language. I would like to open this GUI when player join the server for the first time
-
[1.12] Open GuiScreen on connect
Hello, I would like to open a GuiScreen when the player login but currently the Gui doesn't open when the player connects EventHandler : (register with FMLCommonHandler.instance().bus().register(eventHandler);) GuiHandler : Gui :
-
[1.12] [Solved] No texture on json model block
Thx you draco18s. I found the problem. I just forgot tout put @SubscribeEvent on registerBlock function in the main class. Thank you for your advice and for explaining some things to me
-
[1.12] [Solved] No texture on json model block
I'm sry for the basic mistakes like name class. It's my first mod and I try to understand how it work. I just follow some tutorials but I don't understand why it don't work for me? I will change what do you sayed draco18s and I come back here if I have always this problem. Thank you for taking the time for me
-
[1.12] [Solved] No texture on json model block
I don't have any errors in the console, but I think I made a mistake when I register the block but where? The full code : https://github.com/THEJean-Kevin/goblin
-
[1.12] [Solved] No texture on json model block
Hello, I have a problem and I can't find the source. I would like to create a block with a model but in game, I don't have a texture on the block but I have the texture on the item in the inventory and thrown it on the floor. As in the picture My code
IPS spam blocked by CleanTalk.