Jump to content

Recommended Posts

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(...)?

Posted (edited)
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
Posted
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?

Posted
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>

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

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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