New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

litematic-parser

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

litematic-parser

A parser to get useful information from .litemetica (Minecraft schematics) files

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

litematic-parser

A parser to get useful information from .litematic (Minecraft schematics) files.

Installation

npm install litematic-parser

Usage

import { loadLitematic } from 'litematic-parser';
import { resolve } from 'path';

async function main() {
    const filePath = resolve('./my-schematic.litematic');
    
    try {
        const litematic = await loadLitematic(filePath);

        console.log(`Loaded schematic: ${litematic.Metadata.Name}`);
        console.log(`Author: ${litematic.Metadata.Author}`);
        console.log(`Size: ${litematic.Metadata.EnclosingSize.x}x${litematic.Metadata.EnclosingSize.y}x${litematic.Metadata.EnclosingSize.z}`);
        
        // Access regions and blocks
        for (const [name, region] of Object.entries(litematic.Regions)) {
            console.log(`Region: ${name}`);
            console.log(`Block Palette Size: ${region.BlockStatePalette.length}`);
        }
    } catch (error) {
        console.error('Failed to load litematic:', error);
    }
}

main();

API

loadLitematic(filePath: string): Promise<Litematic>

Reads, decompresses, and parses a .litematic file.

  • filePath: Path to the .litematic file.
  • Returns: A Promise that resolves to a Litematic object containing metadata and region data.

Types

The package exports TypeScript interfaces for the parsed data:

  • Litematic: Root object.
  • Metadata: Schematic metadata (Name, Author, Size, etc.).
  • Region: Contains block states, entities, and tile entities.
  • BlockStatePalette: Palette of blocks used in the region.

Development

# Build the project
npm run build

# Run tests
npm test

License

MIT

Keywords

minecraft

FAQs

Package last updated on 06 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts