Posted October 19, 20213 yr Hello! I start create temp screen, but I can't use Minecraft.getInstance().displayGuiScreen(...) in my mod. I use official snapshot. Where is displayGuiScreen(...)?
October 19, 20213 yr Author 12 minutes ago, uSkizzik said: As you pointed out yourself, it's Minecraft#displayGuiScreen. The method displayGuiScreen(TextGUI) is undefined for the type Minecraft It's 1.16.5 version(official snapshot) Edited October 19, 20213 yr by Trimsku
October 19, 20213 yr 1 minute ago, Trimsku said: The method displayGuiScreen(TextGUI) is undefined for the type Minecraft It's 1.16.5 version(official snapshot) Are you using official mappings or MCP (snapshot) mappings?
October 19, 20213 yr Author Just now, uSkizzik said: Are you using official mappings or MCP (snapshot) mappings? mappings channel: 'official', version: '1.16.5'
October 19, 20213 yr 1 minute ago, Trimsku said: mappings channel: 'official', version: '1.16.5' Could've just said that. It's setScreen now. For future cases, just join the Forge Discord server, go to bot-commands and do !mcp -c moj <Your Class>
October 19, 20213 yr Author Just now, diesieben07 said: The method is called setScreen in official names. Hm, i try use it, but it doesn't work. if(commandContext.getSource().getLevel().isClientSide) { Minecraft.getInstance().setScreen(new TextGUI(new StringTextComponent("name"), new StringTextComponent("...test text..."))); } It's should activate in my command function ( /screen )
October 19, 20213 yr Author Just now, diesieben07 said: Commands are server-side only, so this if statement will never run. Ohhhhh, sorry, thanks!
October 19, 20213 yr Author 8 minutes ago, uSkizzik said: Мог бы просто так сказать. Теперь это setScreen. В будущем просто присоединитесь к серверу Forge Discord, перейдите к командам ботов и выполните! Mcp -c moj <Your Class> Thanks!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.