2

I am currently making a mod mostly about color and design for creative mode, and I've been trying to figure out what function or tool should be made so users can decide on the color they want to use. There is one that I definitely will make which is the Eyedropper tool which would pick up a certain pixel's color. I am unsure of the other, which would best be if it was a block with a tool like this, but I wanted to check if it is possible for gradients to be included in a Minecraft block with a block entity, or would it end up turning pixelated?

This is an example of what I mean by pixelated vs not pixelated (even though, yes, they both end up getting pixelated because they later turn out not being vectors anymore). These are both saved as 64px * 64px, but if you zoom in on them to be the same size, they look different.

72Ppi image

vs

300Ppi image

2
  • I doubt Minecraft supports vector graphics, but it likely support colour gradients under specific conditions (when used a shader, for example). But if something is of an high enough resolution, optically it will be the same. But more importantly: how does this relate to an eye dropper tool? Vector graphics are rendered as pixels as well, I believe (depending on the engine, I guess).
    – Joachim
    Commented Nov 20, 2022 at 13:15
  • The eyedropper tool is actually to pick up just one pixel it's being pointed at! So I don't mind that tool, but you make a very good point about the rendering. Thank you!
    – leguchi
    Commented Nov 20, 2022 at 18:16

1 Answer 1

1

The short answer is that blocks can have whatever textures they want. For reasons of efficiency, vanilla Minecraft limits itself to 16 logical colours for coloured items/blocks, but that is simply a choice, not a technical restriction.

(Side note: it used to be a technical restriction when coloured blocks were stored as a single block + 4 bits of arbitrary data, but that scheme is gone since 1.13)

However, if you are adding custom content, then your textures can be whatever colour(s) you want in the 24-bit RGB space. So, for example if you are generating textures dynamically, then you can include gradients or whatever you want with no problem.

(While not really part of the question, as for implementing the eye dropper tool, it seems like it might be easier to read from the screen buffer than trying to do something like raycasting in the world. But, I'm not sure if that is possible in the Minecraft engine, never tried it myself)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.