From e215779a976886837c4750be954dbc374c68512f Mon Sep 17 00:00:00 2001 From: mikeprimm Date: Thu, 28 Nov 2013 07:25:14 -0800 Subject: [PATCH] Created Defining a Cuboid Block (markdown) --- Defining-a-Cuboid-Block.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Defining-a-Cuboid-Block.md diff --git a/Defining-a-Cuboid-Block.md b/Defining-a-Cuboid-Block.md new file mode 100644 index 0000000..2943d18 --- /dev/null +++ b/Defining-a-Cuboid-Block.md @@ -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).