Skip to main content

Types

In general, tags only statically differentiate between two types: expression and markup. If an expression is assigned to a markup-attribute or vice-versa, parsing will fail as to protect the user from errors during interpretation. All expression-values are interpreted however the tag at hand see fit, with proper fallbacks and console-logs, such that no functionality-inhibitative error may ever occur.

Markup

The markup type refers to the main language of this system, namely Tag Syntax - i.e. an arbitrarily complex construction of tags and attributes.

Code-Blocks are only available within the browser

This exact, full and unrestricted markup may not just be either at the top level, or at the contents of another tag, but also be an attribute-value, as follows:

Code-Blocks are only available within the browser

Which, of course, also includes let-bindings, as to create reusable components.

Code-Blocks are only available within the browser

String

The string type simply represents a sequence of characters, which can either be a direct and static attribute-value

Code-Blocks are only available within the browser

or the result of an expression interpreted as a string, where expression-strings are equivalent to markup-strings

Code-Blocks are only available within the browser

allowing for dynamic construction of arbitrary complexity

Code-Blocks are only available within the browser

Whenever markup-numbers or booleans are specified, their values are stringified if the underlying attribute requires a string-value, such that

Code-Blocks are only available within the browser

becomes Code-Blocks are only available within the browser and

Code-Blocks are only available within the browser

becomes Code-Blocks are only available within the browser, while its counterpart

Code-Blocks are only available within the browser

becomes Code-Blocks are only available within the browser.

Color

The color type operates on the string type by stringifying whatever value is provided, to then interpret that result as a color-value. There are multiple accepted color-formats, as follows.

Ampersand Sequences

So-called legacy colors, of format Code-Blocks are only available within the browser followed by Code-Blocks are only available within the browser or Code-Blocks are only available within the browser, can directly be provided as colors, just like they are supported as Color-Shorthands on tags.

Ansi Colors

Every ampersand-sequence corresponds to an Ansi-Color name, e.g. Code-Blocks are only available within the browser being named Code-Blocks are only available within the browser; these names may also be provided as a color, and are again documented at the shorthands-reference above.

Hex Colors

Last but not least, the full range of colors is made available via what is known as a hexadecimal color sequence - namely a hashtag Code-Blocks are only available within the browser followed up by two hexadecimal (Code-Blocks are only available within the browser and Code-Blocks are only available within the browser) digits for each red, green and blue component, making for a final scheme of Code-Blocks are only available within the browser. Whenever an alpha-channel, meaning translucency, is supported, two more digits representing said alpha-value may be appended, i.e. Code-Blocks are only available within the browser.

Boolean

The boolean type may either be directly supplied via markup (flag-style) attribute-values, i.e.

Code-Blocks are only available within the browser

or

Code-Blocks are only available within the browser

or expression-literals, i.e.

Code-Blocks are only available within the browser

or

Code-Blocks are only available within the browser

When providing a string type, it becomes Code-Blocks are only available within the browser when equaling to Code-Blocks are only available within the browser, Code-Blocks are only available within the browser when equaling to Code-Blocks are only available within the browser and in all other cases, Code-Blocks are only available within the browser if non-empty. When providing a number, Code-Blocks are only available within the browser is only achieved for values not equal to Code-Blocks are only available within the browser. Also, Code-Blocks are only available within the browser-values always result in Code-Blocks are only available within the browser.

Number

The number type accepts either whole numbers (longs)

Code-Blocks are only available within the browser

or fractional numbers (doubles)

Code-Blocks are only available within the browser

where if an attribute operates on whole numbers only, decimal digits will be truncated.

When providing a boolean, Code-Blocks are only available within the browser yields Code-Blocks are only available within the browser and Code-Blocks are only available within the browser yields Code-Blocks are only available within the browser. When providing a string, the system tries to parse it as a number, meaning that Code-Blocks are only available within the browser will become Code-Blocks are only available within the browser; malformed numbers result in Code-Blocks are only available within the browser.

Coordinates

TODO: Write this part of the documentation

(https://minecraft.fandom.com/wiki/Coordinates#Commands)

The coordinates type...

Selector

TODO: Write this part of the documentation

(https://minecraft.fandom.com/wiki/Target_selectors)

The selector type...

PlatformEntity

This wrapper represents a platform-agnostic minimal overview of an entity, which may be a player, or any other creature residing within any given world. It contains the following properties:

  • Code-Blocks are only available within the browser - Name of the entity
  • Code-Blocks are only available within the browser - Custom display-name of the entity, if any (otherwise falls back to Code-Blocks are only available within the browser)
  • Code-Blocks are only available within the browser - The UUIDv4 which identifies this entity
  • Code-Blocks are only available within the browser - The entity's block-location on the Code-Blocks are only available within the browser-axis
  • Code-Blocks are only available within the browser - The entity's block-location on the Code-Blocks are only available within the browser-axis
  • Code-Blocks are only available within the browser - The entity's block-location on the Code-Blocks are only available within the browser-axis
  • Code-Blocks are only available within the browser - The entity's location as a Location

Location

This wrapper represents a point in 3D-space within a named world. It contains the following properties:

  • Code-Blocks are only available within the browser - X-coordinate
  • Code-Blocks are only available within the browser - Y-coordinate
  • Code-Blocks are only available within the browser - Z-coordinate
  • Code-Blocks are only available within the browser - The name of the world, optional (Code-Blocks are only available within the browser means Code-Blocks are only available within the browser)

The ValueInterpreter

The behavior of interpreting one type as another is defined by the Code-Blocks are only available within the browser:

Code-Blocks are only available within the browser

There's a default implementation provided with every instance of the Code-Blocks are only available within the browser, which can be overridden by a custom version using the environment's builder-functions; this is not recommended, since users should be able to predict interpretation as to reduce mental overhead - yet, this feature is kept for power-users.