{"id":20092348,"url":"https://github.com/rubixdev/rustmatica","last_synced_at":"2025-05-06T04:31:41.660Z","repository":{"id":101916353,"uuid":"480933054","full_name":"RubixDev/rustmatica","owner":"RubixDev","description":"A Rust crate for working with Minecraft litematica files","archived":false,"fork":false,"pushed_at":"2025-02-04T20:33:55.000Z","size":963,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T16:08:57.234Z","etag":null,"topics":["litematica","minecraft","minecraft-tool","nbt","rust","rust-crate","schematic"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rustmatica","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubixDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"rubixdev"}},"created_at":"2022-04-12T18:44:13.000Z","updated_at":"2025-02-05T12:46:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4344b80-0053-4134-aba7-8e33ac67a95f","html_url":"https://github.com/RubixDev/rustmatica","commit_stats":{"total_commits":74,"total_committers":3,"mean_commits":"24.666666666666668","dds":0.08108108108108103,"last_synced_commit":"7fd013ebae626b343ed2c6dccfce8be6bc973fc0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Frustmatica","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Frustmatica/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Frustmatica/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubixDev%2Frustmatica/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubixDev","download_url":"https://codeload.github.com/RubixDev/rustmatica/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252622076,"owners_count":21777916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["litematica","minecraft","minecraft-tool","nbt","rust","rust-crate","schematic"],"created_at":"2024-11-13T16:36:44.139Z","updated_at":"2025-05-06T04:31:41.648Z","avatar_url":"https://github.com/RubixDev.png","language":"Rust","readme":"# rustmatica\n\n[![Crates.io](https://img.shields.io/crates/v/rustmatica)](https://crates.io/crates/rustmatica)\n\nA rust crate for working with Minecraft litematica files.\n\n## Overview\n\nThe two main types of this crate are [`Litematic`] and [`Region`]. See their\ndocumentation for more info.\n\nThe\n[`examples` directory](https://github.com/RubixDev/rustmatica/tree/main/examples)\ncontains a few basic examples for how to use this crate.\n\n## Usage with [`mcdata`]\n\n`rustmatica` is tightly coupled with [`mcdata`] and makes use of its traits for\nblock states, entities, and block entities. By default, schematics will use\n[`mcdata`]s \"generic\" types which store most of their data using\n[`fastnbt::Value`]s.\n\n```rust\nuse rustmatica::Litematic;\nuse mcdata::util::BlockPos;\n\n// type must be declared explicitly for Rust to use the default generics\nlet schem: Litematic = Litematic::read_file(\"test_files/axolotl.litematic\")?;\n\n// block has type `mcdata::GenericBlockState`\nlet block = schem.regions[0].get_block(BlockPos::new(1, 0, 1));\nassert_eq!(block.name, \"minecraft:water\");\n// properties aren't typed\nassert_eq!(block.properties[\"level\"], \"0\");\n# Ok::\u003c(), rustmatica::Error\u003e(())\n```\n\nBut [`mcdata`] also offers more concrete types when enabling certain cargo\nfeatures. To use these, add a custom dependency on [`mcdata`] similar to this:\n\n```toml\nmcdata = { version = \"\u003cversion\u003e\", features = [\"latest\", \"block-states\"] }\n```\n\nThen you can use the `mcdata::latest::BlockState` type instead:\n\n```rust\nuse rustmatica::Litematic;\nuse mcdata::{util::BlockPos, latest::BlockState};\nuse bounded_integer::BoundedU8;\n\nlet schem: Litematic\u003cBlockState\u003e = Litematic::read_file(\"test_files/axolotl.litematic\")?;\n\n// block has type `BlockState`\nlet block = schem.regions[0].get_block(BlockPos::new(1, 0, 1));\nassert_eq!(block, \u0026BlockState::Water {\n    level: BoundedU8::new(0).unwrap(),\n});\n# Ok::\u003c(), rustmatica::Error\u003e(())\n```\n","funding_links":["https://ko-fi.com/rubixdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixdev%2Frustmatica","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubixdev%2Frustmatica","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubixdev%2Frustmatica/lists"}