mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-22 02:05:33 +01:00
Created Defining a Cuboid Block (markdown)
parent
0ea30aef87
commit
e215779a97
11
Defining-a-Cuboid-Block.md
Normal file
11
Defining-a-Cuboid-Block.md
Normal file
@ -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).
|
Loading…
Reference in New Issue
Block a user