Skip to content

3D models transform the rendering of item overlays #39

@miyucomics

Description

@miyucomics

Here is a simple item overlay that just fills a black square next to every item.

object TestOverlayRenderer : ItemOverlayRenderer {
    override fun isActive(stack: ItemStack) = true
    override fun render(stack: ItemStack, graphics: DrawContext) {
        graphics.fill(1, 1, 4, 4, (0xff_000000).toInt())
    }
}

However in the image below, you can see that only items with flat textures ( not blocks ) have a visible overlay. I have experimented transforming the matrix stack provided by graphics.getMatrices() and found that it is not failing it to render; the block transformations just make it render rotated in such a way that it gets culled from behind or doesn't render.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions