#How to draw items on different texture with DrawContext in 1.21.6+

1 messages · Page 1 of 1 (latest)

nimble violet
#

As title. In 1.21.5- because the stuffs are drawn immediately so I can "takeScreenshot" on mc.framebuffer. But this method is invalid since 1.21.6. How to do it correctly?

spiral elbow
#

!!xyproblem

drifting galleonBOT
spiral elbow
#

Please explain exactly what you want to accomplish

nimble violet
#

I want to construct a png which contains all item textures and i can get a slice of single item

spiral elbow
#

Isn't that the definition of the atlas

nimble violet
#

I think so

spiral elbow
#

Then just get the atlas

tame cedar
#

Do you need the block item textures?

nimble violet
tame cedar
#

Texture of a block when you have it in the inventory

nimble violet
#

yes

#

including normal items like apple and blockitems like stones

tame cedar
#

You can do client.send() and screenshot in the lambda, there is probably a better way its kind of slow but its fine if you need the item textures in an image file

nimble violet
nimble violet
spiral elbow
#

First of all why do you need the textures

#

This sounds like another xyproblem to me

#

What are you going to do with the atlas

tame cedar
nimble violet
nimble violet
#

So my old idea is to draw an atlas pic on resource reload

tame cedar
#

Can you show your code?

nimble violet
#

I'll create a small test only for this later

tame cedar
#

Do you want to store the items as images or generate the image on the fly?

nimble violet