xVoidZx Posted February 27, 2020 Posted February 27, 2020 (edited) I can't find any documentation for 1.15.2 forge on how to do this. I basically want a thirst meter that goes above the hunger bar. If anyone knows where any docs for this are or has any source code please let me know! This is my first time using forge, normally I make plugins for Spigot so apologies. Edited February 27, 2020 by xVoidZx Quote
imacatlolol Posted February 28, 2020 Posted February 28, 2020 (edited) Subscribe to the RenderGameOverlayEvent (Pre or Post, depending on your needs) and put your rendering code there. Important: Make sure to filter the event by calling getType on it, otherwise your code will be called multiple times which isn't good. For your purposes, I'd recommend filtering for the FOOD event type. To see what your rendering code would need to be, simply study how vanilla does it. A good example of what you're trying to do would be in ForgeIngameGui#renderFood. Edited February 28, 2020 by imacatlolol 1 Quote I'm eager to learn and am prone to mistakes. Don't hesitate to tell me how I can improve.
Recommended Posts
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.