Jump to content

Moving/Reposition HUD elements


Nooeee

Recommended Posts

Hi, I wanted to change up the players HUD to look like the one back in the beta days of minecraft.

I managed to remove some elements using this code. But is there a way to simply change the position /  X and Y coordinates of them instead of removing them?

Or is there a way to "re-add" them at a different position? :)

 

public void clear(RenderGameOverlayEvent.Pre event)
{
    if (event.type == ElementType.FOOD)
	{
		event.setCanceled(true);
	}
	if (event.type == ElementType.EXPERIENCE)
	{
		event.setCanceled(true);
	}
	if (event.type == ElementType.HEALTH)
	{
		event.setCanceled(true);		
	}
	if (event.type == ElementType.AIR)
	{
		event.setCanceled(true);
	}
	if (event.type == ElementType.ARMOR)
	{
		event.setCanceled(true);
	}
}
}
Link to comment
Share on other sites

2 minutes ago, diesieben07 said:

No. The values are hardcoded in GuiIngame (resp. GuiIngameForge). You have to draw them yourself at the new position.

Could I maybe "override" the entire GuiIngameForge class? So it would you my modified one instead of using the normal one forge provides?

Link to comment
Share on other sites

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.