Skip to content

Rendered Textures

MehVahdJukaar edited this page Jul 25, 2026 · 1 revision

Rendered Textures

Render an item, a block or anything else into a texture you can then draw as a flat image.

The game can only draw a block model in 3D. If you want a flat picture of one, on a label, a map, a sign, a GUI, there's no vanilla way to get it. This renders into an offscreen framebuffer once and hands you back a texture you use like any other.

Getting Started

FrameBufferBackedDynamicTexture texture =
        RenderedTexturesManager.requestFlatItemTexture(Items.DIAMOND_BLOCK, 32, t -> {});

if (texture.isInitialized()) {
    VertexConsumer vc = buffer.getBuffer(RenderType.entityCutout(texture.getTextureLocation()));
    // draw it like any other texture
}

The request is asynchronous, the texture fills in when it's rendered, so check isInitialized() before using it. Textures are cached by id, so requesting the same one every frame is fine.

For anything more complex, request by your own id and draw into it yourself:

var texture = RenderedTexturesManager.requestTexture(MyMod.res("my_texture"), 64, t -> {
    // draw into the texture here, see RenderedTexturesManager.drawTexture
}, true);

Use TickableFrameBufferBackedDynamicTexture if the content has to update over time.

Example: RenderedTextureExample

Clone this wiki locally