Use Schematic

Bonjour petite question
Je voulais sauvegarder une liste de BlockSnapshot, mais ça prend énormément de place!!! Est ce qu’il existe quelque chose pour réduire la place que cela prend en conf comme utiliser des Schematic ?
Je pensais enlever les clé WorldUuid et Position, puis les remettre quand j’utilise le BlockSnapshot

[Google trad]
Hello little question
I wanted to save a list of BlockSnapshot, but it takes up a lot of space !!! Is there anything to reduce the space it takes up like using Schematic?
I was thinking of removing the WorldUuid and Position keys, then putting them back when I use the BlockSnapshot
Thank you

Hello. If you wish to save schematics then you can as Sponge has support for the Sponge Schematic format that is used in WorldEdit for MC 1.13 and newer.

Here is a good starting point

Schematic.builder()

Je peux avoir un exemple stp ?
[Google trad]
Can I have an example please?

Im on my phone so I haven’t been able to test this. I personally have not touched the in built schematics at all but its something like this.

ArchetypeVolume volume; //your collection of blocks
Schematic schematic = Schematic
            .builder()
            .metaValue(Schematic.METADATA_NAME, "Test")
            .volume(volume)
            .paletteType(BlockPaletteTypes.LOCAL)
            .build();
File file = new File("schematics/test.schematic");
file.getParentFile().mkdirs();
DataContainer container = DataTranslators.SCHEMATIC.translate(schematic);
try {
    FileOutputStream fileOutputStream = new FileOutputStream(file);
    DataFormats.NBT.writeTo(fileOutputStream, container);
} catch (FileNotFoundException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}