Mineuniverse
Grass Block (Minecraft 4k)

Grass Block (Minecraft 4k)

In Minecraft 4k, the grass block has a block ID of 1. It was originally the XOR Block. Unlike normal Minecraft, grass blocks do not turn into dirt when a…

3 min read Updated 1 views
Blocks Blocks with no item form Minecraft 4k
Advertisement Remove ads with Premium →
Contents (7)
  1. Texture
  2. Data values
  3. ID
  4. History
  5. Gallery
  6. Textures
  7. References
This feature is exclusive to Minecraft 4k.
Grass Block
4k-2 Grass Block.png: Infobox image for Minecraft infobox 'Grass Block'

In Minecraft 4k, the grass block has a block ID of 1. It was originally the XOR Block. Unlike normal Minecraft, grass blocks do not turn into dirt when a block is placed above it.

Texture

The grass block's side texture if it was 512×512 instead of 16×16

The texture for the Grass block was 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 grass block'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 does the following algorithm to determine the current pixel's "color".

  1. The game evaluates ((3x2 + 81x) ÷ 4) & (i ÷ 4 − 1) where x and y are the "index" of the pixels; that is the amount of pixels from the left and topmost pixels respectively, and i is the size of the generated texture. (note that & represents a bitwise AND, and is responsible for keeping the grass color in roughly the top quarter of the block, as well as the pattern that it creates) The output of this operation will be called "grassCheck".
  2. The game then takes the performs the following comparisons in order:
    • If y + i × subTexture < grassCheck + 9⁄8 i, it will set color to
       #6AAA40
      and proceed to the next step. (does not evaluate the next condition)
    • If y + i × subTexture < grassCheck + 9⁄8 i + 1, it will set randomVariation to 2⁄3 randomVariation and proceed to the next step. This will "blend" the grass texture into the dirt texture by darkening the dirt below the grass.
      • This will also cause the grass generation to fall through into the dirt's texture generator, which sets "color" to
         #966C4A
    • If subTexture is 0, the first condition will always be met, and if subTexture is 2, both conditions will be not be met.
  3. 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.
  4. The game multiplies each of "color"'s RGB channels by randomVariationWithBlockSideLight to get the final RGBA color of the pixel on the texture.[1]

Data values

ID

NameNumeric ID Form
BlockSprite grass-block-4k.png: Sprite image for grass-block-4k in Minecraft [No displayed name]1Block

History

Minecraft 4k
4k-2 Added grass block, replacing the XOR Block.

Textures

References

Advertisement Remove ads with Premium →

More in Blocks with no item form

View all 20 →
Dirt (Minecraft 4k)Dirt (Minecraft 4k)In Minecraft 4k, there are 10 variants of dirt, but they only have slight texture differences. Many of them appear to be a placeholder texture as ID 9 was…End Gateway (block)End Gateway (block)The End gateway is a block that forms a part of End gateways, which teleport the player between the central island and the outer islands in the End. It is…End Portal (block)End Portal (block)The End portal block is a block generated when an End portal or exit portal is activated, which teleports the player between the Overworld and the End. It…FireFireFire is a non-solid block that can spread to nearby flammable blocks and destroy them.Invisible BedrockInvisible BedrockInvisible bedrock is an invisible block used to create a world boundary around Old worlds and the void floor in Bedrock Edition.LavaLavaLava is a light-emitting fluid that causes fire damage, mostly found in the lower reaches of the Overworld and the Nether.Leaves (Minecraft 4k)Leaves (Minecraft 4k)In Minecraft 4k, leaves have a block ID of 8.Log (Minecraft 4k)Log (Minecraft 4k)In Minecraft 4k, log has a block ID of 7.
Advertisement Remove ads with Premium →

Related mods

Clean Swing Through Grass Clean Swing Through Grass Mod · 58.1M downloads Grass Overhaul (Sod) Grass Overhaul (Sod) Mod · 25.3M downloads Fast Better Grass Fast Better Grass Resource Pack · 11.4M downloads Cobblemon Classic Grass Pack Cobblemon Classic Grass Pack Resource Pack · 6.6M downloads
Explore the Minecraft Wiki
Blocks, items, mobs, biomes and game mechanics — all in one place.
Wiki home