pub struct TileSet {
pub base: String,
pub size: [i32; 3],
pub part_max: i32,
pub grid: [i32; 3],
pub data_version: i32,
pub generator: String,
pub parts: Vec<TilePart>,
}Expand description
A volume packaged as several structure templates.
This is the structure_set block of a tiled prefab’s metadata file, and it
is the whole contract: given it and the .nbt files it names, a consumer can
rebuild the original volume without knowing anything about who tiled it or
why. It is Serialize and Deserialize on purpose — the producer and
the consumer share one definition, so a field cannot be added on one side and
missed on the other.
Fields§
§base: StringThe filename stem every tile is named from.
size: [i32; 3]The whole volume’s extent [x, y, z] — what the author asked for.
part_max: i32The per-axis cap the tiling had to respect.
grid: [i32; 3]How many tiles along each axis.
data_version: i32The MC data version every tile targets (ADR-0009).
generator: StringProvenance breadcrumb: what wrote the tiles.
parts: Vec<TilePart>The tiles, in x→y→z grid order.
Implementations§
Source§impl TileSet
impl TileSet
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Refuse a manifest that does not describe an exact tiling of size.
A consumer that skips this reassembles a volume with a hole in it and
reports success — the manifest is data on disk, and a truncated or
hand-edited one must be a refusal rather than a quietly smaller
building. Checks that every part lies inside the volume, that no axis
exceeds part_max, and that the parts’ volumes sum to the whole.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TileSet
impl<'de> Deserialize<'de> for TileSet
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for TileSet
impl JsonSchema for TileSet
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more