Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (โ‹ฎ) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello! I start create temp screen, but I can't use Minecraft.getInstance().displayGuiScreen(...) in my mod. I use official snapshot. Where is displayGuiScreen(...)?

  • 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 by Trimsku

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?

  • Author
Just now, uSkizzik said:

Are you using official mappings or MCP (snapshot) mappings?

mappings channel: 'official', version: '1.16.5'

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>

  • 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 )

  • Author
Just now, diesieben07 said:

Commands are server-side only, so this if statement will never run.

Ohhhhh, sorry, thanks!

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions โ†’ Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.