Skip to content
Marios F edited this page Aug 24, 2017 · 3 revisions

How to define blocks

A block in amcc is a 3D shape with a collection of PNG files as side skins. The configuration file 'assets/blocks/blocks.cfg' contains the definitions for all the blocks that are available. Inside the 'assets/blocks/' directory is also where all the PNG files are located. (For now) Each PNG file must be 16x16 in dimensions.

The generic configuration format follows. Names must be without spaces and things in parenthesis are just hints for you, not to be used in the actual format.

block_name {
    (No particular order or usage is mandatory but some of those should be used to avoid glitches)
    (Beware, 'all' overwrites previous settings, it should be used on-top before anything else)
    all file.png (Use the same file for all sides)
    right file.png
    left file.png
    top file.png
    bottom file.png
    back file.png
    front file.png

    (Optional, defaults to 'cube')
    shape shape_name ('shape_name' can be either 'cube' or 'fake3d')

    (Optional, defaults to 'false')
    isTransparent boolean ('boolean' can be either 'true' or 'false')
}

'cube' is a 1x1x1 cube, of course...

'fake3d' is like a bush, with two quads forming an X shape. Only 'right' and 'left' sides are used. It's also hardwired to be transparent, the 'isTransparent' option is ignored.

'isTransparent' governs whether blocks behind this one should be drawn.

Clone this wiki locally