Minecraft:Bricks (Minecraft 4k)
More actions
Template:Italic title Template:Exclusive Template:InfoboxIn Minecraft:Minecraft 4k, bricks have a block ID of 5.
Texture
The texture for bricks were generated by the game at runtime (similarly to what was done in Java Edition at that time for water and lava), rather than being stored inside of the jar as an image file.
As with all other block textures in Minecraft 4k, the brick's textures are generated by going over every pixel in the texture left to right, top to bottom.
For each texture, there is a value that will be called "subTexture".
- subTexture = 0 is the top texture
- subTexture = 1 is the side texture
- subTexture = 2 is the bottom texture
For each pixel, the game generates a new "randomVariation", which is calculated by subtracting a random value from 0 to 95 from 255, resulting in a random value between 160 and 255.
After that, the game creates a new value called "color" which determined with the following steps:
- If ((x + (floor(y / 4) * 4)) mod 8) = 0 (for the vertical lines) or (y mod 4) = 0 (for the horizontal lines) where x and y are the "index" of the pixels; that is the amount of pixels from the left and topmost pixels respectively, "color" will be set to Template:Color (note that the floor function shown in the first equation is not in code, as it is a consequence of y being an int)
- Else, if both condition are false, "color" will be set to Template:Color
The game then creates a new value, that will be called "randomVariationWithBlockSideLight", where
- If subTexture = 2 (the bottom texture) set randomVariationWithBlockSideLight to randomVariation ÷ 2.
- Else, set randomVariationWithBlockSideLight to randomVariation.
The game multiplies the each of "color"'s RGB channels by randomVariationWithBlockSideLight to get the final RGBA color of the pixel on the texture.<ref>https://github.com/NeRdTheNed/MC-TextureGen/blob/main/mc-texture-gen-impl/src/main/java/com/github/nerdthened/mctexturegen/generators/MC4k2Generator.java</ref>
Data values
ID
History
Gallery
Textures
-
Top texture
-
Side texture
-
Bottom texture