minecraft.wiki-mirror/wiki_backup/moving block.txt

153 lines
4.9 KiB
Text

Pistons and sticky pistons have 2 technical blocks that cannot be obtained. These include the '''piston head''' and '''moving piston''' blocks.
== Piston head ==
{{Infobox block
|title=Piston Head
| group=Regular
| group2=Sticky
| 1-1=Piston Head.png
| 1-2=Piston Head BE.png
| 2-1=Sticky Piston Head.png
| 2-2=Sticky Piston Head BE.png
|renewable=Yes
|invimage=pistonArmCollision
|light=No
|transparent=Yes
|tool=any
|flammable=No
|lavasusceptible=No
|stackable=No
}}
The '''piston head''' is a technical block used as the second block of an extended piston. A block state defines whether it is a normal or a sticky piston head. It can be placed using the {{cmd|setblock}} command or with the [[debug stick]], though if not part of a proper piston, it disappears after receiving any [[block tick]], such as when a block is placed next to it unless the player uses the debug stick. It drops nothing.
{{IN|java}}, the normal and sticky piston heads are distinguished by a block state. {{IN|bedrock}}, they use separate block IDs, and it can be obtained as an item via inventory editors.
=== Block states ===
{{see also|Block states}}
{{:Piston/BS3}}
{{-}}
== Moving piston ==
{{Infobox block
|title=Moving Piston
|image=Moving Piston.png
|invimage=movingBlock
|renewable=Yes
|transparent=Yes
|light=No
|tool=None
|flammable=No
|lavasusceptible=No
|stackable=No
}}
The '''moving piston''', also known as '''block 36''' due to its [[Java Edition data values/Pre-flattening/Block IDs|pre-flattening block ID]], is an unobtainable technical block that contains part of a piston head, and/or part of one or two blocks that the piston is carrying into or out of the grid cell (including blocks carried indirectly via [[slime block]]s). Since moving blocks vary in how much of each grid cell they occupy, they can't be stored as normal [[block]]s and are instead stored as [[block entities]]. It is overwritten with air, the piston head or the carried block at the end of the piston stroke; but if it is placed through editing and no piston is connected, it remains indefinitely.
It is invisible and non-solid {{in|java}}, and cannot be broken without the use of [[commands]] or [[TNT]]. Although it is non-solid, fluids cannot pass through it. It also prevents players from building at its location. [[Mobs]] can see through it, but cannot walk through it.
The game treats the block as a [[stone]] block when it comes to the player's footstep sounds. It is similar to [[Invisible Bedrock]] in properties with the exception that the player can walk through the moving piston but not invisible bedrock.
=== Block states ===
{{see also|Block states}}
{{:Piston/BS2}}
=== Block data ===
The moving piston has a block entity associated with it that holds additional data about the block.
{{el|java}}:
{{see also|Block entity format}}
{{:Piston/BE}}
{{el|bedrock}}:
: See [[Bedrock Edition level format/Block entity format]].
{{-}}
== Data values ==
=== ID ===
{{edition|java}}:
{{ID table
|edition=java
|showblocktags=y
|showforms=y
|generatetranslationkeys=y
|displayname=Piston Head
|spritetype=block
|nameid=piston_head
|form=block}}
{{ID table
|displayname=Moving Piston
|spritetype=block
|nameid=moving_piston
|blocktags=dragon_immune, wither_immune
|form=block
|foot=1}}
{{ID table
|displayname=Moving piston entity
|spritename=moving-piston
|spritetype=block
|nameid=piston
|foot=1}}
{{edition|bedrock}}:
{{ID table
|edition=bedrock
|shownumericids=y
|showaliasids=y
|showforms=y
|generatetranslationkeys=y
|displayname=Piston Head
|spritetype=block
|nameid=piston_arm_collision
|aliasid=pistonArmCollision
|id=34
|form=block
|itemform=piston_arm_collision
|itemform2=<br>Alias ID: <code>pistonarmcollision</code>}}
{{ID table
|displayname=Sticky Piston Head
|spritename=piston-head
|spritetype=block
|nameid=sticky_piston_arm_collision
|aliasid=stickyPistonArmCollision
|id=472
|form=block
|itemform=stick_piston_arm_collision
|itemform2=<br>Alias ID: <code>stickpistonarmcollision</code>}}
{{ID table
|displayname=Moving Block
|spritetype=block
|nameid=moving_block
|aliasid=movingBlock
|id=250
|form=block
|itemform=moving_block
|itemform2=<br>Alias ID: <code>movingblock</code>
|foot=1}}
{{ID table
|notnamespaced=y
|displayname=Moving block entity
|spritename=moving-piston
|spritetype=block
|nameid=MovingBlock
|foot=1}}
== History ==
{{:Technical blocks/Pistons}}
== Trivia ==
* Mobs can spawn inside the piston head block.
* {{IN|bedrock}}, the piston head is invisible and non-solid when placed with commands. The moving piston cannot be placed with block placement commands in this edition.
* The <code>moving_piston</code> is transparent and does not emit light.
** If a light-emitting block is moved, the player can see it turn dark briefly. If an opaque block is moved, the player may see light passing through it.
== Navigation ==
{{Navbox blocks|utility}}
== References ==
{{reflist}}
[[ja:ピストン/テクニカルブロック]]
[[pt:Pistão/Componentes técnicos]]