Template:MC/Block structure renderer
More actions
Template:Documentation header Template:Lua Displays a block structure renderer.
Usage
You need to create a map of a letter to a block state, for example:
A=glass B=chest[facing=east,type=single,waterlogged=true] C=water[level=0]
Each block state must have all of its properties defined. Missing properties might result in a mismatched model.
Two special characters cannot be overwritten: - represents structure void; + represents air.
A block structure is defined in the from X to Z to Y. Comma indicates the end of this X row and the beginning of the next X row, meaning an increment of Z. Semicolon ; ends the structure at this Y level and starts at (0,0) at the next level, meaning an increment of Y. Here is an example:
A+A,+A+,A+A;+++,+B+,+++;+++,+C+,+++
The marks parameter can be used to highlight certain blocks in the block structure. You need a coordinate and a color code to define a mark. To mark (x, y, z) with color, write x,y,z#color. Separate marks with semicolons ;. If there is no blocks to be marked, omit this parameter and the "render marks" checkbox will not appear in the renderer.
1,0,1#114514;1,2,1#191981
Combining these parts:
<syntaxhighlight lang="wikitext"> Template:Block structure renderer </syntaxhighlight>
Template:Block structure renderer
Check browser's console warnings and errors to fix the errors in the parameters when applicable.
You can assign default values for the renderer's settings:
camera: Sets the initial position and rotation of the camera. The format should bex,y,z;pitch,yaw, among which pitch and yaw are in degrees. The camera's default position is at the south of the structure, and the camera faces the center of the structure.orthographic: Whether to use orthographic projection. Can only betrueorfalse. Other values are seen asfalse.animatedtexture: Whether to use animated texture. Can only betrueorfalse. Other values are seen asfalse.showinvisibleblocks: Whether to render invisible blocks. Can only betrueorfalse. Other values are seen asfalse.displaymarks: Whether to render marks. Does not take effect if themarksparameter does not exist. Can only betrueorfalse. Other values are seen asfalse.backgroundcolor: Sets the background color. Defaults to#808080.backgroundalpha:Sets the opacity of the background. Defaults to 128.
Scripts
Typically this template is not filled out by hand and is instead generated with a tool.
This tool converts Minecraft's structure files to this template. This tool is for litematic schematics.
Limitations
Because Conduit, End Portal (block) and End Gateway (block) cannot be baked, the renderer cannot render these blocks.
Template:Sandbox otherIf you're done making changes, please refresh the text.
Please add categories and interwikis to Template:MC/Block structure renderer/doc. (View all subpages of this page.)