#how to make a pre-made image texture on the player's screen?

23 messages · Page 1 of 1 (latest)

void scarab
#

there's absolutely no way it won't work unless you're doing something very wrong

#

wait, multiple people told you that before

#

including me SCtired

#

it works

#
       HudRenderCallback.EVENT.register((context, tickDelta) -> {
            int color = 0xFFFF0000; // Red
            context.fill(0, 0, 100, 100, 0, color);
        });
``` this renders a red square as expected
#
HudRenderCallback.EVENT.register(new m_dis_config());
``` this does absolutely nothing because your `onHudRender` is not doing anything
#

use DrawContext's methods to render something

#

you are already provided a DrawContext instance in onHudRender. Use that

#

(or use the lambda like you rendered the red square)

void scarab
#

that's not how you draw a texture

#

i don't have to because there's already an example

void scarab
#

before anything please take a java tuotial, your naming conventions are extremely confusing

#

and frankly you seem very new to java

#

learn java first please, we expect a modder to have a good java understanding

#
        HudRenderCallback.EVENT.register((context, tickDelta) -> {
            Identifier m_dis_1 = new Identifier("minecraft", "dis/m_dis/m_dis_1.png");
            context.drawTexture(m_dis_1, 90, 90, 0, 0, 32, 32, 32, 32);
        });
``` this is the only code you need to draw a texture
#

i have no idea where you got the rest of the code

void scarab
#

this is wrong new Identifier("minecraft", "dis/m_dis/m_dis_1.png");

#

assets should be under your mod's namespace