Too late to request in time for next update?

  • Hi,


    It would be really great if I could have API access to hud stuff. I would like to hide things like the health bar, sprint bar, hunger and thirst (I know Red you've said inventory hide show API will be really - which is awesome!). I would also like to change where the block id info is shown. I.e. not in the bottom left when using a block.


    I would like to hide the 'default' game hud and replace it with a sever specific "themed" one.

  • I'm sorry I didn't reply earlier to this topic :/ Unfortunately it's tricky to provide a "clean" way to access the game GUI... the best way would be if the various vanilla GUI elements (e.g. HUD elements) would be treated as "GuiElements" (similar to the custom GUI elements you create through the API), so you could manipulate them or retrieve their information (position, size etc). Unfortunately the server has no information about the GUI, so it cannot provide the default information (position etc) about these elements...


    Probably we'll just add a new type of GUI object which only has setters. Although we still need a proper way to identify paritcular GUI elements (e.g. the block id label, or the health bar) through the API :|


    The next update will introduce an "Internals" class which provides access to some internal server classes, objects and methods. Maybe we could put a dirty method there to modify at least the position, size and visibility of a particular vanilla element...

  • visibility of a particular vanilla element

    @red51 yes being able to set them as invisible would work. Bars such as health, hunger and thirst I can create already, I could get things like block id label too using a ray-cast but I'm not sure if that would be the correct way to do it? i.e. that way might be too expensive?

  • With the latest hotfix, you can use the Internals class to show/hide or move a vanilla GUI element ;) In addition to that, you can attach a GUI element to a vanilla element (e.g. the inventory): https://javadoc.rising-world.n…Element-java.lang.String-


    Every vanilla element has a unique name (e.g. "HungerIcon", "ThirstIcon", "HealthBar", "StaminaBar", "Crosshair"). Some of them are grouped together (e.g. "StatusContainer", "IndicatorContainer", "QuickSlotContainer" etc.)

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!