Jump to content

How to make a custom entity eyes layer render over fog.


McArctic

Recommended Posts

Back in 1.16.5 I could make my custom mobrender type render over fog. That was done with the RenderType fog. I have no clue how to do this in 1.18.2 can anyone help??

Old 1.16.5 Code

    public static RenderType getCustomEyes(ResourceLocation p_228652_0_) {
        TextureState renderstate$texturestate = new TextureState(p_228652_0_, false, false);
        return makeType("custom_eyes", DefaultVertexFormats.ENTITY, 7, 256, false, true, RenderType.State.getBuilder().texture(renderstate$texturestate).transparency(ADDITIVE_TRANSPARENCY).writeMask(COLOR_WRITE).fog(BLACK_FOG).fog(NO_FOG).build(false));
    }
}

New Code So Far.
 

    public static RenderType getCustomEyes(ResourceLocation p_228652_0_) {
        RenderStateShard.TextureStateShard renderstate$texturestate = new RenderStateShard.TextureStateShard(p_228652_0_, false, false);
        return create("eyes", DefaultVertexFormat.NEW_ENTITY, VertexFormat.Mode.QUADS, 256, false, true, RenderType.CompositeState.builder()
                .setShaderState(RENDERTYPE_EYES_SHADER).setTextureState(renderstate$texturestate)
                .setTransparencyState(ADDITIVE_TRANSPARENCY).setWriteMaskState(COLOR_WRITE)
                .createCompositeState(false));
    }

 

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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