Minecraft:Waypoint style
More actions
Template:Exclusive Waypoint styles are Minecraft:JSON files located in Minecraft:resource packs that define styling used for changing waypoints' icon and specific distances they appear on the Minecraft:locator bar. They are used in Template:Cmd command for specific entities.
JSON format
Waypoint styles are stored as JSON files on Template:Cd directory.
- Template:Nbt: The root object.
- Template:Nbt: The distance in blocks at which the waypoint icon begins its visual transition between sprites. The first sprite in the Template:Nbt list is always used for any distance less than this value, and for the 0th sprite index. Default value is 128.
- Template:Nbt: The distance in blocks at which the waypoint icon completes its visual transition. It must be greater than Template:Nbt. At this distance and beyond, the last sprite in the Template:Nbt list is used. Default value is 332.
- Template:Nbt: A list of Minecraft:sprites which cycle between the Template:Nbt and Template:Nbt.
- Template:Nbt: A sprite identifier, formatted as Template:Cd, which refers to a unique texture located in Template:Cd. Specifying a nonexistent causes the Minecraft:missing texture to be used, rather than the default waypoint texture.
Sprite selection
To determine which sprite is used based on the distances, the game uses Template:W on the player's distance between the near and far distance values, getting the index of which sprite is supposed to be shown in the Template:Nbt list. This calculation in the game is roughly equivalent to:
<math>\text{Sprite index} = \lfloor \left( \frac{\text{Player distance} - \text{Near distance}}{\text{Far distance} - \text{Near distance}} \right) \times \text{Size of sprites list} \rfloor</math>
Noticeably, the second sprite does not appear until the first index is calculated, which until then, the game uses the first sprite for the 0th index calculated, and for any distance less than the near distance. This is due to the Template:W for indexing the sprites list.
The distance (in blocks) which a sprite appears between transition can be calculated from:
<math>\text{Sprite distance between transition} = \frac{\text{Far distance} - \text{Near distance}}{\text{Size of sprites list}}</math>
History
Template:Navbox Java Edition technical
Minecraft:de:Wegpunktdarstellung Minecraft:ja:ウェイポイントのスタイル Minecraft:pt:Estilo do marcador Minecraft:zh:路径点样式