Skip to content

Create new HUD Item #1611

Answered by warjort
Tiebe asked this question in Mod Dev Support
Aug 3, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Are you using the fabric event?

HudRenderCallback.EVENT.register((maxtrixStack, tickDelta) -> { 
/* Your code here */
});

I believe the rendering system is supposed to be pretty much in the default state when it is called?

Anyway, try something like:

RenderSystem.disableBlend();
RenderSystem.defaultBlendFunc();

But you might break some other rendering if you do this at a "random" point in the hud rendering code.

You can also look at Minecraft's RenderPhase and RenderLayer classes to see some common use cases of the RenderSystem.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tiebe
Comment options

Answer selected by Tiebe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants