Color extraction for new blockstates #159
Replies: 3 comments 3 replies
-
I didn't had looked all the code. But I can see you are using reflect here. And that's what make you annoying I think. Go's reflecting is always annoying. Maybe, you can marshal the block.Block into NBT, and unmarshal it back to a map[string]interface{}. And hopes that will make you happy. Btw, good job. It will be cool to post some screenshots here. |
Beta Was this translation helpful? Give feedback.
-
Actually, from what I see after applying palette to actual terrain, I do not include tints of blocks, it is a huge problem, grass, leaves, water and all that stuff is basically white and transparent because of this... Not sure how to fix it properly since my current chunk scraper does not include biome information. Also lack of flag that block is transparent not helping at all... |
Beta Was this translation helpful? Give feedback.
-
So I argued about better blockstate interfaces recently but regardless of that here is my color generator that I made.
Single thread, no optimizations were made (only those that I could think upon writing thing by itself), res.png preserved, output is a
map[int]color.RGBA64
where key is an array index toblock.StateList
.Will use it for my web-map WebChunk to color surface of the world.
https://gist.github.com/maxsupermanhd/cd64f374fefdeb746138b112fe474dc3
Beta Was this translation helpful? Give feedback.
All reactions