{"id":29630981,"url":"https://github.com/uberswe/mcnbt","last_synced_at":"2025-07-21T11:07:50.799Z","repository":{"id":304741282,"uuid":"1016953611","full_name":"uberswe/mcnbt","owner":"uberswe","description":"MC-NBT is a Go library for working with Minecraft NBT (Named Binary Tag) data, specifically focused on schematic formats used in Minecraft.","archived":false,"fork":false,"pushed_at":"2025-07-14T22:49:11.000Z","size":160598,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-15T03:08:11.038Z","etag":null,"topics":["create-mod","litematica","minecraft","nbt","nbt-parser","schematics","worldedit"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uberswe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-09T19:37:02.000Z","updated_at":"2025-07-14T22:48:51.000Z","dependencies_parsed_at":"2025-07-15T03:09:56.772Z","dependency_job_id":"a855c146-daef-43b7-add3-ba4dcf6efc61","html_url":"https://github.com/uberswe/mcnbt","commit_stats":null,"previous_names":["uberswe/mcnbt"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/uberswe/mcnbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmcnbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmcnbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmcnbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmcnbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uberswe","download_url":"https://codeload.github.com/uberswe/mcnbt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uberswe%2Fmcnbt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266287824,"owners_count":23905461,"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":["create-mod","litematica","minecraft","nbt","nbt-parser","schematics","worldedit"],"created_at":"2025-07-21T11:07:49.668Z","updated_at":"2025-07-21T11:07:50.788Z","avatar_url":"https://github.com/uberswe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MC-NBT\n\nMC-NBT is a Go library for working with Minecraft NBT (Named Binary Tag) data, specifically focused on schematic formats used in Minecraft.\n\n## Features\n\n- Parse and decode NBT data from various Minecraft schematic formats:\n  - Litematica (.litematic)\n  - WorldEdit (.schem)\n  - Create (.nbt)\n- Convert between different schematic formats\n- Unified standard format that consolidates blocks, entities, and tile entities\n- Encode and save schematics in any supported format\n\n## Standard Format\n\nThe library uses a standard format that can represent any of the supported schematic formats. This standard format consolidates blocks, entities, and tile entities into a single data structure, making it easier to work with and convert between formats.\n\nThe `StandardBlock` type represents blocks, entities, and tile entities with a `Type` field to distinguish between them:\n- `\"block\"` for regular blocks\n- `\"entity\"` for entities\n- `\"tile_entity\"` for tile entities (block entities)\n\n## Usage\n\n### Parsing a Schematic\n\n```go\n// Parse a schematic file\ndata, err := mcnbt.ParseAnyFromFileAsJSON(\"path/to/schematic.litematic\")\nif err != nil {\n    // Handle error\n}\n\n// Convert to standard format\nstandard, err := mcnbt.ConvertToStandard(data)\nif err != nil {\n    // Handle error\n}\n\n// Access blocks, entities, and tile entities\nfor _, block := range standard.Blocks {\n    switch block.Type {\n    case \"block\":\n        // Handle block\n    case \"entity\":\n        // Handle entity\n    case \"tile_entity\":\n        // Handle tile entity\n    }\n}\n```\n\n### Converting Between Formats\n\n```go\n// Parse a schematic file\ndata, err := mcnbt.ParseAnyFromFileAsJSON(\"path/to/schematic.litematic\")\nif err != nil {\n    // Handle error\n}\n\n// Convert to standard format\nstandard, err := mcnbt.ConvertToStandard(data)\nif err != nil {\n    // Handle error\n}\n\n// Convert to another format\nworldEdit, err := mcnbt.ConvertFromStandard(standard, \"worldedit\")\nif err != nil {\n    // Handle error\n}\n\n// Save to file\nerr = mcnbt.EncodeToFile(worldEdit, \"worldedit\", \"path/to/output.schem\")\nif err != nil {\n    // Handle error\n}\n```\n\n## Supported Formats\n\n### Litematica (.litematic)\n\nLitematica is a mod for Minecraft that allows players to create and place schematics. The library supports parsing and creating Litematica schematics.\n\n### WorldEdit (.schem)\n\nWorldEdit is a popular in-game map editor for Minecraft. The library supports parsing and creating WorldEdit schematics.\n\n### Create (.nbt)\n\nCreate is a mod for Minecraft that adds various mechanical blocks and tools. The library supports parsing and creating Create schematics.\n\n## Notes\n\n- When converting between formats, some data loss may occur, especially for entities and tile entities, as different formats support different features.\n- The library focuses on preserving block data during conversion, while entity and tile entity data may be simplified or lost.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberswe%2Fmcnbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuberswe%2Fmcnbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuberswe%2Fmcnbt/lists"}