Map<String, Tag> metadata = requireTag(schematic, "Metadata", CompoundTag.class).getValue();
int width = requireTag(schematic, "Width", ShortTag.class).getValue();
int height = requireTag(schematic, "Height", ShortTag.class).getValue();
int length = requireTag(schematic, "Length", ShortTag.class).getValue();
int[] offsetParts = requireTag(schematic, "Offset", IntArrayTag.class).getValue();
if (offsetParts.length != 3) {
throw new IOException("Invalid offset specified in schematic.");
int offsetX = requireTag(metadata, "WEOffsetX", IntTag.class).getValue();
int offsetY = requireTag(metadata, "WEOffsetY", IntTag.class).getValue();
int offsetZ = requireTag(metadata, "WEOffsetZ", IntTag.class).getValue();
BlockVector3 offset = BlockVector3.at(offsetX, offsetY, offsetZ);
origin = min.subtract(offset);
int paletteMax = requireTag(schematic, "PaletteMax", IntTag.class).getValue();
Map<String, Tag> paletteObject = requireTag(schematic, "Palette", CompoundTag.class).getValue();
if (paletteObject.size() != paletteMax) {
throw new IOException("Differing given palette size to actual size");
int id = requireTag(paletteObject, palettePart, IntTag.class).getValue();
BlockState state;
try {
byte[] blocks = requireTag(schematic, "BlockData", ByteArrayTag.class).getValue();
List<Map<String, Tag>> tileEntityTags = requireTag(schematic, "TileEntities", ListTag.class).getValue().stream()
.map(tag -> (CompoundTag) tag)