Confirmedusers
342
edits
(Move some of content into a new Usage section. Add a Used by blocks section.) |
(→Usage: adjust terms) |
||
Line 16: | Line 16: | ||
== Usage == | == Usage == | ||
There are several meaningful ways to define a group of orientation variants for a block. Each orientation | There are several meaningful ways to define a group of orientation variants for a block. Each orientation type has different variant code requirements and different properties for the OmniRotatable behavior. Where possible, the examples below use [[Json:block:worldvariantgroups|world properties]] to assist in defining the variant states, but this is optional; the states may be directly listed instead. | ||
<table class="wikitable"> | <table class="wikitable"> | ||
<tr style="background-color: rgba(0,0,0,0.2);"> | <tr style="background-color: rgba(0,0,0,0.2);"> | ||
<th style="background-color: rgba(0,0,0,0.2);">Orientation | <th style="background-color: rgba(0,0,0,0.2);">Orientation type</th> | ||
<th style="background-color: rgba(0,0,0,0.2);">Required variant | <th style="background-color: rgba(0,0,0,0.2);">Required variant codes</th> | ||
<th style="background-color: rgba(0,0,0,0.2);">Example block</th> | <th style="background-color: rgba(0,0,0,0.2);">Example block</th> | ||
<th style="background-color: rgba(0,0,0,0.2);">Example variant | <th style="background-color: rgba(0,0,0,0.2);">Example variant definition</th> | ||
<th style="background-color: rgba(0,0,0,0.2);">Required behavior properties</th> | <th style="background-color: rgba(0,0,0,0.2);">Required behavior properties</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>HV Vector</td> | ||
<td> | <td> | ||
* <code>rot</code> variant | * <code>rot</code> variant code with the states "north", "east", "south", "west", "up", and "down" | ||
</td> | </td> | ||
<td>slab</td> | <td>slab</td> | ||
Line 35: | Line 35: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Vertical</td> | ||
<td> | <td> | ||
* <code>rot</code> variant | * <code>rot</code> variant code with the states "up" and "down" | ||
</td> | </td> | ||
<td>none</td> | <td>none</td> | ||
Line 44: | Line 44: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Horizontal</td> | ||
<td> | <td> | ||
* <code>rot</code> variant | * <code>rot</code> variant code with the states "north", "east", "south", and "west" | ||
</td> | </td> | ||
<td>none</td> | <td>none</td> | ||
Line 53: | Line 53: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>Horizontal Vertical</td> | ||
<td> | <td> | ||
* <code>rot</code> variant | * <code>rot</code> variant code with the states "north", "east", "south", and "west" | ||
* <code>v</code> variant | * <code>v</code> variant code with the states "up" and "down" | ||
</td> | </td> | ||
<td>none</td> | <td>none</td> | ||
Line 63: | Line 63: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td>3 Axis</td> | ||
<td> | <td> | ||
* <code>rot</code> variant | * <code>rot</code> variant code with the states "north", "east", "south", and "west" | ||
* <code>v</code> variant | * <code>v</code> variant code with the states "up", "down", "left", and "right" | ||
</td> | </td> | ||
<td>trapdoor</td> | <td>trapdoor</td> | ||
Line 74: | Line 74: | ||
</table> | </table> | ||
Additionally, the behavior adds a placement mode to items. The behavior shows the placement mode when the item is hovered over in the inventory or hotbar. The placement modes are auto, horizontal, and vertical. Auto is the default. The horizontal and vertical modes only work correctly for | Additionally, the behavior adds a placement mode to items. The behavior shows the placement mode when the item is hovered over in the inventory or hotbar. The placement modes are auto, horizontal, and vertical. Auto is the default. The horizontal and vertical modes only work correctly for the HV vector type. | ||
The behavior changes the placement mode when it detects that the block was created through crafting, and the first item in the recipe was an orientable block. So to allow changing the placement mode, add a 1x1 recipe that takes the block as input and produces it as output. The placement mode changes in the following cycle: auto to horizontal, horizontal to vertical, and vertical to auto. | The behavior changes the placement mode when it detects that the block was created through crafting, and the first item in the recipe was an orientable block. So to allow changing the placement mode, add a 1x1 recipe that takes the block as input and produces it as output. The placement mode changes in the following cycle: auto to horizontal, horizontal to vertical, and vertical to auto. |