Skip to content

feat: Legacy .schematic support, Batch Converter, and Thumbnail Fixes#24

Open
Larson-Logan wants to merge 24 commits intoPiTheGuy:masterfrom
Larson-Logan:master
Open

feat: Legacy .schematic support, Batch Converter, and Thumbnail Fixes#24
Larson-Logan wants to merge 24 commits intoPiTheGuy:masterfrom
Larson-Logan:master

Conversation

@Larson-Logan
Copy link

@Larson-Logan Larson-Logan commented Dec 6, 2025

Summary

This PR implements several major requested features and improvements to the converter:

  1. Legacy Support: Added full read/write support for the legacy .schematic (MCEdit/Classic WorldEdit) format. This allows conversion from and to the old format.
  2. Batch Conversion: Added a new Python helper script src/scripts/convert_all.py and a build script scripts/build_executable.bat to allow users to mass-convert entire folders of schematics recursively.
  3. Thumbnail Preservation: Updated the core Schematic class and AxiomSchematicFormat to correctly read and preserve embedded preview images (thumbnails) when converting Axiom .bp files.
  4. Documentation: Updated README.md with instructions for the new Batch Converter tool.

Resolves Issues

Changes

New Files:

  • src/main/java/pitheguy/schemconvert/converter/formats/ClassicSchematicFormat.java
  • src/main/java/pitheguy/schemconvert/converter/LegacyMappings.java
  • src/scripts/convert_all.py
  • src/scripts/build_executable.bat

Modified:

  • src/main/java/pitheguy/schemconvert/converter/Schematic.java: Added thumbnail field and builder support.
  • src/main/java/pitheguy/schemconvert/converter/formats/AxiomSchematicFormat.java: Added logic to read/write embedded thumbnails.
  • README.md: Added Batch Converter usage guide.
  • .gitignore: Added build artifacts.

Verification

  • Verified compilation with ./gradlew build.
  • Tested converting .schem to .schematic successfully.
  • Tested mass conversion using the new convert_all.exe generated by the batch script.
  • Verified that thumbnails are preserved when converting between .bp files.

- Added LegacyMappings to convert between Block IDs and modern BlockStates.
- Implemented ClassicSchematicFormat for reading and writing .schematic files.
- Updated Schematic class to support the .schematic extension and fixed missing getters.
- Registered the new format in SchematicFormats.
- Added legacy_mappings.json resource file.
- Verified functionality with tutorialtrees.schematic test case.
The README has been updated to include new features.
@PiTheGuy PiTheGuy self-requested a review December 27, 2025 02:43
Copy link
Owner

@PiTheGuy PiTheGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of extraneous formatting changes in this PR that make it more difficult to review.

Also, I'm not sure a seperate executable is the right approach for batch coversion. I think it would be better to implement in the main app. It already mostly has been, but it could do with a few improvements like supporting folders rather than just a list of files.

return sb.toString();
}

public static int getInt(Tag tag) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CompoundTag already has getInt and getDouble methods. If we're going to improve reading, I think it would be better to do it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please add .schematic format feat: support folders as input for mass convertion

2 participants