Jump to content

(1.16.5) Draw colored outline for item in GUI


Soft-fur dragon

Recommended Posts

Item may be both mine or vanilla

As title says, I want to render it in GUI

yes, ItemStack

Current render code

        this.itemRenderer.zLevel = 100.0F;
        for (ResearchTableEntity.ItemState state : container.researchTableEntity.getItemStates()) {
            this.itemRenderer.renderItemAndEffectIntoGUI(this.minecraft.player, state.item, tableRect.x + state.pos.x - 8, tableRect.y + state.pos.y - 8);
        }
        this.itemRenderer.zLevel = 0.0F;

 

Edited by Soft-fur dragon
Link to comment
Share on other sites

hm, I'm thinking you could use of a shader, there may be a simpler way which I'm not aware of;

Silhouete and outline are different things, to shade for a silhoute you could render any non-tranparent pixel of the item texture as black (or whatever color you'd want for the silhoute. actually, if you grayscaled the item texture you could tint it to whatever monochrome color you'd want). shaders for outline are a little more complicated, but not much, you can find info on such shaders online

again, there maybe be an easier way to do it, but I'm not sure

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.

Announcements



×
×
  • Create New...

Important Information

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