User Tools

Site Tools



Voxels definitions are stored in the voxels/ directory. Each file ends in .voxels and can override another one ( vanilla/core voxels are loaded first, then your mods so they can override vanilla ones ). The .voxels files use the NamedWithProperties file format.

Voxel definition blocks begin by the 'voxel' tag, and you are supposed to assign them an ID after stating their name. Voxel definitions can be overwritten by mods, be careful.

Example from the core voxels file

# ChunkStories
# Voxel definition format 0.3

voxel air 0
	solid: false
	opaque: false

voxel grass 2
	textures: '~', 'dirt', '~side', '~side', '~side', '~side'

voxel dirt 3

voxel leaves 5
	opaque: false
	selfOpaque: false
	affectedByWind: true

voxel snow 17
	customClass: io.xol.chunkstories.voxel.core.Voxel8Steps
	opaque: false
	selfOpaque: true
	model: 'steps.m0'

voxel water 128
	selfOpaque: true
	solid: false
	opaque: false
	liquid: true

voxel glowing 16
	emitting: 15

voxel soil 36
	opaque: false
	selfOpaque: true
	model: 'steps.m6'
	collisionBox: (0.0, 0.0, 0.0, 1.0, 0.875, 1.0)


  • solid : Is this voxel solid in the physics engine sense
  • opaque : Is this voxel 'full' and so blocks lights and cull neighbours ?
  • selfOpaque : If this voxel is not “opaque”, does it connects with others voxels of the same type ? (ie glass or water)
  • liquid : Used for physics engine and rendering passes, does this voxel has the properties of a liquid ?
  • material : Defines the Material used by this voxel type
  • emitting : 0-15, how much light does it emmits
  • model : Said block model name and optional subtype ( See Custom block models ))
  • texture : Sets the texture used by this voxel, by default it just looks for the voxel name instead. For more information check out the page on Voxel textures.
  • textures : Define each side's texture independently, in order LFRBTB
  • collisionBox : Defines the collision box for this voxel. To have voxels with more than one collision box, you have to use a custom class.
  • customClass: If provided, the game will try to use a custom class for this voxel.
  • billboard : Not recommanded. Special option, makes the block's normal always face you.

The voxels/textures folder

Contains textures for the voxels. Accessed by their name in the code/.voxels files. The normal/ folder contain the normal-mapped versions of the textures, if not provided the game uses a flat default normal map. The meta.txt contains informations about the scale and whatnot of the textures :

texture smoothstone
	textureScale: 2

texture sand2
	textureScale: 4

The voxels textures in those folders are merged in a texture atlas before usage.

voxels_format.txt · Last modified: 2017/07/24 00:08 by gobrosse