-
Notifications
You must be signed in to change notification settings - Fork 9
Data types
Daniel Saukel edited this page May 1, 2018
·
10 revisions
Basically means this:
key: value
Note that keys are always Strings, while values may be any value listed here.
Type | Size | Annotation | Example |
---|---|---|---|
Byte | 8 Bit | Numeric value from -128 to 127 | key: 64 |
Short | 16 Bit | Numeric value from -32,768 to 32,767 | key: 367 |
Integer | 32 Bit | Numeric value from -2^31 to 2^31-1 | key: 5000 |
Long | 64 Bit | Numeric value from -2^63 to 2^63-1 | key: 1525199972497 |
Float | 32 Bit | Decimal number | key: .23 |
Double | 64 Bit | Decimal number (may be large af) | key: 5430.674343 |
Boolean | 1 Bit | True / false value | key: true |
A String is a sequence of characters. Since some values break the YAML syntax, you might need to add "" to indicate the beginning and the end of the string.
key: "This is a String"
key:
- "value"
- "also part of the value"
key:
value_key: "Value String"
another_value_key: 5.678
key: "c3fd48a2-c23c-4952-84e7-bf62a1408c99"
https://www.base64encode.org can be used to encode Base64 strings. A common Minecraft related use case is the serialization of user profiles to make persistent texture values.
Many nice texture values meant to be used with heads can be found here.
key: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjM0ODdkNDU3ZjkwNjJkNzg3YTNlNmNlMWM0NjY0YmY3NDAyZWM2N2RkMTExMjU2ZjE5YjM4Y2U0ZjY3MCJ9fX0="
Wiki: © 2016-2020 Daniel Saukel and contributors, licensed under CC BY-SA