-
Notifications
You must be signed in to change notification settings - Fork 0
Block Types
MichaelFisher1997 edited this page Jan 5, 2026
·
1 revision
Complete reference of all block types implemented in ZigCraft.
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) |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 1 | stone |
✅ | ❌ | 0 |
Gray |
| 2 | dirt |
✅ | ❌ | 0 |
Brown |
| 3 | grass |
✅ | ❌ | 0 |
Green |
| 4 | sand |
✅ | ❌ | 0 |
Tan |
| 8 | cobblestone |
✅ | ❌ | 0 |
Dark Gray |
| 9 | bedrock |
✅ | ❌ | 0 |
Black |
| 10 | gravel |
✅ | ❌ | 0 |
Gray-Brown |
| 12 | snow_block |
✅ | ❌ | 0 |
White |
| 17 | clay |
✅ | ❌ | 0 |
Blue-Gray |
| 19 | mud |
✅ | ❌ | 0 |
Dark Brown |
| 30 | terracotta |
✅ | ❌ | 0 |
Orange |
| 31 | red_sand |
✅ | ❌ | 0 |
Orange-Red |
| 32 | mycelium |
✅ | ❌ | 0 |
Purple-Gray |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 0 | air |
❌ | ✅ | 0 | — |
| 5 | water |
❌ | ✅ | 0 |
Blue |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 14 | coal_ore |
✅ | ❌ | 0 |
Black |
| 15 | iron_ore |
✅ | ❌ | 0 |
Orange-Brown |
| 16 | gold_ore |
✅ | ❌ | 0 |
Yellow |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 6 | wood |
✅ | ❌ | 0 |
Brown |
| 7 | leaves |
✅ | ✅ | 0 |
Green |
| 20 | mangrove_log |
✅ | ❌ | 0 |
Red-Brown |
| 21 | mangrove_leaves |
✅ | ✅ | 0 |
Green |
| 22 | mangrove_roots |
✅ | ✅ | 0 |
Brown |
| 23 | jungle_log |
✅ | ❌ | 0 |
Dark Brown |
| 24 | jungle_leaves |
✅ | ✅ | 0 |
Green |
| 27 | acacia_log |
✅ | ❌ | 0 |
Gray-Brown |
| 28 | acacia_leaves |
✅ | ✅ | 0 |
Green |
| 29 | acacia_sapling |
✅ | ✅ | 0 |
Green |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 33 | mushroom_stem |
✅ | ❌ | 0 |
Off-White |
| 34 | red_mushroom_block |
✅ | ❌ | 0 |
Red |
| 35 | brown_mushroom_block |
✅ | ❌ | 0 |
Brown |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 13 | cactus |
✅ | ✅ | 0 |
Dark Green |
| 25 | melon |
✅ | ✅ | 0 |
Light Green |
| 26 | bamboo |
✅ | ✅ | 0 |
Bright Green |
| 36 | tall_grass |
✅ | ✅ | 0 |
Green |
| 37 | flower_red |
✅ | ✅ | 0 |
Red |
| 38 | flower_yellow |
✅ | ✅ | 0 |
Yellow |
| 39 | dead_bush |
✅ | ✅ | 0 |
Tan |
| ID | Block | Solid | Transparent | Light | Color |
|---|---|---|---|---|---|
| 11 | glass |
✅ | ✅ | 0 |
Light Blue |
| 18 | glowstone |
✅ | ❌ | 15 |
Yellow-White |
Note:
glowstoneis the only light-emitting block in the game.
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;
};To add a new block type:
- Add entry to
BlockTypeenum insrc/world/block.zig - Register properties in
isSolid(),isTransparent(),getLightEmission(),getColor() - Add textures to
src/engine/graphics/texture_atlas.zig - Update
src/world/chunk_mesh.zigfor special rendering logic
See Contributing for detailed instructions.
Source: src/world/block.zig | Last updated: January 2026
Gray
Brown
Green
Tan
Dark Gray
Black
Gray-Brown
White
Blue-Gray
Dark Brown
Orange
Orange-Red
Purple-Gray
Blue
Black
Orange-Brown
Yellow
Brown
Green
Red-Brown
Brown
Dark Brown
Gray-Brown
Green
Off-White
Red
Brown
Dark Green
Light Green
Bright Green
Red
Yellow
Tan
Light Blue
Yellow-White