Created Defining a Cuboid Block (markdown)

mikeprimm 2013-11-28 07:25:14 -08:00
parent 0ea30aef87
commit e215779a97

@ -0,0 +1,11 @@
A cuboid block is simply a simple, cubic block that has been clipped (truncated) on one or more of its axes. The result is a rectangular prism shape that otherwise has textures applied in the same way as a [simple, solid block](Defining-a-Simple-Block) would have done.
To define a cuboid block, first add the "boxblock:" line to the [Model Definition file](Model-Definition-Files). See [[Defining Cuboid Models]] for details. An example of this is the model definition for the Wooden Pressure Plate (which requires clipping of all three axes):
boxblock:id=72,data=*,xmin=0.0625,xmax=0.9275,ymax=0.0625,zmin=0.0625,zmax=0.9275
Next, the textures for the block are defined as they would be for a simple, solid block: simply use a "block:" line with texture references for each of the 6 standard faces. See [[Defining a Simple Block]] for details on this. The corresponding texture definition for the Wooden Pressure Plate example (above) is:
block:id=72,allfaces=0:planks_oak,stdrot=true,transparency=TRANSPARENT
Note: Most blocks suitable for rendering as a cuboid block will require the *transparency* attribute to be set - to TRANSPARENT for blocks that don't block lighting to other blocks, or to SEMITRANSPARENT for blocks that do block light (like slabs or stair).