ウィキのスタイルガイドが改定されました。スタイルガイドでは、ウィキに記事を書く際のスタイルについて解説しています。(9月19日更新)

利用者:Tammynamiki/Sandbox

提供: Minecraft Wiki
移動先: 案内検索
Lua logo.svg

このテンプレートは、モジュール:Materials rowを使用しています。また、このスクリプトはLuaで書かれています。

This template is used to create the rows for the table containing the material properties on Materials.

Usage

The parameter is set to the title to display in the first column.

The parameter {{{rgb}}} contains three color values separated by commas to display as a colored cell and text. It should be set based on the material's map color. If unset, it defaults to a white color and the text "None"

Properties

The table contains the following properties. They are set to 1 for true, and 0 for false.

Name Description Default
{{{liquid}}} The block allows the player to swim. 0
{{{solid}}} This block allows block dependent blocks to be placed on it, and is considered when spawning various structures. 1
{{{blockmove}}} This block prevents movement through it, and usually suffocates entities inside of it. 1
{{{tool}}} This block requires a tool to give a drop. 0
{{{burn}}} This block can become lit from lava. 0
{{{replace}}} This block will be replaced from using another block on it. 0
{{{solidBlocking}}} Does not seem to be used anywhere in Minecraft, and is not displayed in the table. 1

Subclasses can also be set using {{{subclass}}} for to change the defaults based on coded subclasses. Values include:

  • liquid
    • defaults {{{liquid}}} and {{{replace}}} to 1
    • defaults {{{blockmove}}} and {{{solid}}} to 0
    • defaults {{{piston}}} to "replace"
  • nonsolid
    • defaults {{{solid}}} and {{{blockmove}}} to 0
  • transparent
    • defaults {{{solid}}} and {{{blockmove}}} to 0
    • defaults {{{replace}}} to 1
    • defaults {{{piston}}} to "replace"

The parameter {{{piston}}} can be set to determine the interaction when a piston pushes the block. Options are as follows:

  • pushed - pushes the block, default
  • replace - breaks the block being pushed
  • blocked - stops the piston from extending

Code

The parameters generally correspond to the actual structure of the code.

  • {{{subclass}}} does not refer to the code, it is instead just a useful tool to mass-define parameters.
  • {{{liquid}}} refers to the isLiquid() method.
  • {{{solid}}} refers to the isSolid() method.
  • {{{blockmove}}} refers to the blocksMotion() method.
  • {{{burn}}} refers to the isFlammable() method.
  • {{{replace}}} refers to the isReplaceable() method.
  • {{{solidBlocking}}} refers to the isSolidBlocking() method.
  • {{{tool}}} refers to the isAlwaysDestroyable() methods.
  • {{{piston}}} refers to the getPushReaction() methods.

See also