Jump to content

[ help ] - How would you delete a portion of the HUD?


Recommended Posts

Posted

Hello,

 

Without modifying base classes such as GuiIngame.java, I'm not sure how I would do this. For example, how would I remove the armour or health bars from displaying at all? In my mind, using something like RenderGameOverlayEvent or TickType.RENDER would overlay or add something to the screen, but I don't think using it to delete something would be possible without something maybe like event.setCancelled(true); like Bukkit does. Does anyone else know how I would do this?

Posted

RenderGameOverlayEvent and cancel what you need ...

 

ez pz :P

I am Mew. The Legendary Psychic. I behave oddly and am always playing practical jokes.

 

I have also found that I really love making extremely long and extremely but sometimes not so descriptive variables. Sort of like what I just did there xD

Posted

1 register your event handler

2 in your handler check if its the thing you want to stop

3 cancel it

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

RenderGameOverlayEvent contains the type, check if its the type you want

they are called very obvious names... like health,armor etc

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Ok so I found the type method, and I registered the variable as ElementType health = e.type.HEALTH;. Now, I'm looking through the methods and I can't find anything that says to cancel it, except for the original e.setCancelled(boolean). But thats a boolean, and I'm not sure if you can find the variable to e... I'm so confused. I'm sorry if I'm a hassle. :(

Posted
except for the original e.setCancelled(boolean). But thats a boolean,

 

so ?

 

what do you expect to give to that method ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

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.