Skip to content

Block Types

MichaelFisher1997 edited this page Jan 5, 2026 · 1 revision

Block Types

Complete reference of all block types implemented in ZigCraft.


Overview

ZigCraft currently features 40 block types spanning terrain, vegetation, ores, and decorative blocks. Each block has properties that define its behavior in the world.

Property Description
Solid Blocks player/entity movement
Transparent Allows light and visibility through
Light Emission Brightness level emitted (0-15)

All Block Types

Terrain Blocks

ID Block Solid Transparent Light Color
1 stone 0 #808080 Gray
2 dirt 0 #8C5933 Brown
3 grass 0 #4DA633 Green
4 sand 0 #E6D999 Tan
8 cobblestone 0 #666666 Dark Gray
9 bedrock 0 #262626 Black
10 gravel 0 #736B66 Gray-Brown
12 snow_block 0 #F2F2FF White
17 clay 0 #9999B3 Blue-Gray
19 mud 0 #594D4D Dark Brown
30 terracotta 0 #B3664D Orange
31 red_sand 0 #CC661A Orange-Red
32 mycelium 0 #664D66 Purple-Gray

Liquids & Air

ID Block Solid Transparent Light Color
0 air 0
5 water 0 #3366CC Blue

Ores

ID Block Solid Transparent Light Color
14 coal_ore 0 #1A1A1A Black
15 iron_ore 0 #998066 Orange-Brown
16 gold_ore 0 #E6CC33 Yellow

Trees & Logs

ID Block Solid Transparent Light Color
6 wood 0 #8C5926 Brown
7 leaves 0 #338026 Green
20 mangrove_log 0 #734040 Red-Brown
21 mangrove_leaves 0 #338026 Green
22 mangrove_roots 0 #664D33 Brown
23 jungle_log 0 #804D1A Dark Brown
24 jungle_leaves 0 #338026 Green
27 acacia_log 0 #998C80 Gray-Brown
28 acacia_leaves 0 #338026 Green
29 acacia_sapling 0 #4D9933 Green

Mushrooms

ID Block Solid Transparent Light Color
33 mushroom_stem 0 #E6E6D9 Off-White
34 red_mushroom_block 0 #CC3333 Red
35 brown_mushroom_block 0 #99664D Brown

Vegetation & Foliage

ID Block Solid Transparent Light Color
13 cactus 0 #1A991A Dark Green
25 melon 0 #99CC33 Light Green
26 bamboo 0 #66CC33 Bright Green
36 tall_grass 0 #4DA633 Green
37 flower_red 0 #E61A1A Red
38 flower_yellow 0 #E6E61A Yellow
39 dead_bush 0 #664D1A Tan

Utility & Decorative

ID Block Solid Transparent Light Color
11 glass 0 #CCE6F2 Light Blue
18 glowstone 15 #FFE680 Yellow-White

Note: glowstone is the only light-emitting block in the game.


Block Properties API

Defined in src/world/block.zig:

pub const BlockType = enum(u8) {
    // ... block definitions

    pub fn isSolid(self: BlockType) bool;
    pub fn isTransparent(self: BlockType) bool;
    pub fn isOpaque(self: BlockType) bool;
    pub fn getColor(self: BlockType) [3]f32;
    pub fn getLightEmission(self: BlockType) u4;
    pub fn getFaceColor(self: BlockType, face: Face) [3]f32;
};

Adding New Blocks

To add a new block type:

  1. Add entry to BlockType enum in src/world/block.zig
  2. Register properties in isSolid(), isTransparent(), getLightEmission(), getColor()
  3. Add textures to src/engine/graphics/texture_atlas.zig
  4. Update src/world/chunk_mesh.zig for special rendering logic

See Contributing for detailed instructions.


Source: src/world/block.zig | Last updated: January 2026

Clone this wiki locally