Create and manipulate MCEdit Schematic files in PocketMine-MP plugins.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A library for creating and manipulating MCEdit Schematic files.

Implementing into plugins

Best way to implement this code is to use it as a git module.


Loading schematic files

try {
	$schematic = new Schematic("castle.schematic");
} catch (\Throwable $error) {
	// Handle error

Saving schematic files

try {
	$schematic->save("castle.schematic"); // With custom name
	$schematic->save(); // With the name you used before
} catch (\Throwable $error) {
	// Handle error

Pasting schematics

$target = $player->getPosition();
foreach($schematic->getBlocks() as $block) {
	$target->level->setBlock($target->add($block), $block);

Fixing Block IDs

If you have blocks not currently in PMMP/MCPE, you will need to call the following after loading a schematic:


I'm a fluent person

So am I!

try {
	new Schematic("castle.schematic")
} catch (\Throwable $error) {
	// Handle error