Posted June 29, 20223 yr Eya! I'm trying to do a overlay gui with images (only images, no strings), to do a health bar, like a typical MMORPG overlay gui, but I'm not finding any references on vanilla to do it, so, i would like to know what class to extend, or any vanilla code to check
June 29, 20223 yr Author Mhh, I don't know how it really works, i'm trying with OverlayRegistry, ForgeIngameGui and Gui, but don't get it. All I have is that: https://ibb.co/VxhzPwy to create my overlay https://ibb.co/P1FMVf9 and that's my GUI class with my gui delimited I've tried to do something like this like ForgeIngameGui: https://ibb.co/HrpCWt8 but I can't create a new protected void render
June 29, 20223 yr Author Okay, I've that now, what I'm doing wrong? https://ibb.co/2qb2L77 https://ibb.co/Vpvbzsk
June 29, 20223 yr Author 17 minutes ago, diesieben07 said: Do not store the Minecraft instance in a field. Minecraft is already a singleton. Done, tnxs 17 minutes ago, diesieben07 said: You need to learn the basics of Java, specifically the difference between static and non-static members. Ya, i know that it needs to be static, but i cant call "blit" method if it's static
June 29, 20223 yr If it helps, I did something similar recently. This is the overlay class, implementing IIngameOverlay: https://github.com/Syrikal/alchemine/blob/main/src/main/java/syric/alchemine/client/VitaSlimeOverlay.java Here's my overlay registry class, which triggers at the same time I register blocks and items and whatnot: https://github.com/Syrikal/alchemine/blob/aae585ab7d23fd4be688a60642f200ab09a4fe38/src/main/java/syric/alchemine/setup/AlchemineOverlays.java And here's where I turn the overlays on and off (it's triggered by RenderFogEvent because it happens concurrently with some fog stuff, but this is a little hacky.) https://github.com/Syrikal/alchemine/blob/47d9d08a092d3e26441bace8fb5014db0c78c332/src/main/java/syric/alchemine/client/FogEffects.java
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.