Jump to content

Getting Info from the server To render a gui overlay


Recommended Posts

I am working on making a guiOverlay for my mod, and what I have at the moment doesnt seem to work, I am trying to have my overlay (which is in a Subscribed event for RenderGameOverlayEvent.Post) to get a config file, located on the server side. the information it is trying to get will determin how full or empty the overlay is (its basically a mana bar)

I attempted to use a tutorial to add custom stats located here:




how ever it doesnt seem to work. I made a post on it, but it has yet to be answered. So I went about it a different way, and have it and all the other stats and skills saved to a custom config file that is put in the player data folder using the players uuid with the .skill extension. I then have the clients get the skills and stats from the config file to determine different things. but since the gui is client only it cant get the config from the server to render the mana bar. so it stays full.  I was thinking that I could use the Packet system to request the info from the server, but then in the packet from the server to the client in the onMessage() method, I am unsure of how to use the info stored in the packet to render the GUI and I feel like there is a much better way to go about this. Any help is welcome.



Link to comment
Share on other sites

capabilities are only for 1.8+ otherwise I would. Enough people are using 1.7.10 still, and once I get 1.7.10 released, I will upgrade to 1.8.9, 1.10, 1.11, 


that link offers a way to use a system similar to capabilities but for 1.7, and I cant get it to work.

Edited by Elrol_Arrowsend
Link to comment
Share on other sites

  • Guest locked this topic
This topic is now closed to further replies.

  • Create New...

Important Information

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