import type { JsonRegistry } from 'sandstone/arguments/generated/_json/registry.ts' import type { JsonNBTObject } from 'sandstone/arguments/nbt.ts' import type { JsonNBTList, NBTInt, NBTIntArray } from 'sandstone' export type JsonFilterable = ({ raw: T, /** * Shown only to players with chat filtering enabled. */ filtered?: T, } | T) export type JsonFlatWeightedEntry = ({ /** * Value: * Range: 0.. */ weight: (NBTInt<{ min: 0, }> | number), } & T) export type JsonFlatWeightedList = Array> export type JsonGlobalPos = { /** * Coordinates of the location in [x, y, z] * * Value: * Array length range: 3 */ pos: NBTIntArray<{ leftExclusive: false, rightExclusive: false, min: 3, max: 3, }>, /** * Dimension of the location */ dimension: JsonRegistry['minecraft:dimension'], } export type JsonInclusiveRange = (T | JsonNBTList | { min_inclusive: T, max_inclusive: T, }) export type JsonNonEmptyFlatWeightedList = JsonNBTList, { leftExclusive: false, min: 1, }> export type JsonNonEmptyWeightedList = JsonNBTList, { leftExclusive: false, min: 1, }> export type JsonRotation = ('none' | 'clockwise_90' | '180' | 'counterclockwise_90') export type JsonWeightedEntry = { /** * Value: * Range: 0.. */ weight: (NBTInt<{ min: 0, }> | number), data: T, } export type JsonWeightedList = Array>