legacy

package
v0.0.0-...-cfc9b19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package legacy reads MCEdit-format `.schematic` files and maps the pre-1.13 numeric (block ID, data value) tuples to Java-edition state strings via a vendored table from EngineHub/WorldEdit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lookup

func Lookup(id, data int) (string, bool)

Lookup returns the Java state string for a pre-1.13 (id, data) tuple. The table includes id=0 (air); callers don't need a special case.

func Read

func Read(r io.Reader) (*schem.Schematic, error)

Read parses a legacy MCEdit `.schematic` from r.

func Scan

func Scan(r io.Reader, yield schem.BlockHandler) (schem.ScanInfo, error)

Scan parses a legacy MCEdit `.schematic` from r and calls yield for each translated block without materialising a full schem.Schematic.Blocks slice.

func ScanWithInfo

func ScanWithInfo(r io.Reader, onInfo schem.InfoHandler, yield schem.BlockHandler) (schem.ScanInfo, error)

ScanWithInfo parses a legacy MCEdit `.schematic` from r, calls onInfo once after dimensions are known, then calls yield for each translated block.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL