-// In this file, JSON refers to WTF-JSON, a variant of JSON used by Minetest
+// In this file, JSON refers to WTF-JSON.
+//
+// BUG(mt): Stackstrings use variant of JSON called WTF-JSON
// where \u00XX escapes in string literals act like Go's \xXX escapes.
+// This should not be fixed because it would break existing items.
package mt
ItemMeta
}
+// String returns the Stack's stackstring.
func (s Stack) String() string {
if s.Count == 0 {
return ""
return b.String()
}
+// Scan scans a stackstring, implementing the fmt.Scanner interface.
func (stk *Stack) Scan(state fmt.ScanState, verb rune) (err error) {
*stk = Stack{}