s2d

package module
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: 0 Imported by: 0

README

S2D

Schematic to Dragonfly, with Bedrock-friendly block translation.

S2D reads Java Minecraft schematic files and turns them into Dragonfly-ready blocks for Bedrock servers. It is designed for projects that need reliable schematic imports without tying the conversion layer to a command system or a specific server plugin.

Highlights

  • Reads Sponge .schem files, including modern v2 and v3 layouts.
  • Reads legacy MCEdit .schematic files.
  • Translates Java block states into Bedrock/Dragonfly block states.
  • Preserves neutral minecraft: identifiers and state data for blocks Dragonfly does not model directly.
  • Streams schematics when you do not want to materialize every block at once.
  • Reports unknown states so conversion gaps are easy to audit.

Usage

package main

import (
	"os"

	"github.com/Velvet-MC/s2d/schem"
	_ "github.com/Velvet-MC/s2d/sponge"
)

func load(path string) (*schem.Schematic, error) {
	f, err := os.Open(path)
	if err != nil {
		return nil, err
	}
	defer f.Close()

	return schem.Read(path, f)
}

Packages

  • schem provides the public read and scan APIs.
  • sponge reads Sponge schematic files.
  • legacy reads classic MCEdit schematics.
  • translate owns Java-to-Bedrock block conversion.
  • palette parses Java block-state palette keys.

License

MIT

Documentation

Overview

Package s2d (Schematic-to-Dragonfly) is the umbrella module for reading Java-edition Minecraft schematic files and translating them into Dragonfly world.Block values for use on Bedrock-edition servers.

Consumers usually import github.com/Velvet-MC/s2d/schem plus one or more format reader packages for registration, such as github.com/Velvet-MC/s2d/sponge.

Directories

Path Synopsis
cmd
s2d-coverage command
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.
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.
Package palette parses Java edition block-state strings of the form "namespace:name[k1=v1,k2=v2,...]" used in Sponge schematic palettes.
Package palette parses Java edition block-state strings of the form "namespace:name[k1=v1,k2=v2,...]" used in Sponge schematic palettes.
Package schem is the public entry point for the S2D library.
Package schem is the public entry point for the S2D library.
Package sponge reads Sponge Schematic (.schem) files.
Package sponge reads Sponge Schematic (.schem) files.
Package translate maps Java edition block-state strings to Dragonfly world.Block values.
Package translate maps Java edition block-state strings to Dragonfly world.Block values.
properties
Package properties holds per-property Java→Bedrock value converters.
Package properties holds per-property Java→Bedrock value converters.

Jump to

Keyboard shortcuts

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