3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 02:50:05 +01:00

Correct tag name for writing and add compatibilty for created corrupt schematics

Dieser Commit ist enthalten in:
dordsor21 2020-09-18 18:31:42 +01:00
Ursprung 9c34702a47
Commit cf750ba00c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
2 geänderte Dateien mit 6 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -157,6 +157,10 @@ public class FastSchematicReader extends NBTSchematicReader {
tilesDelegate.withInfo((length, type) -> tiles = new ArrayList<>(length));
tilesDelegate.withElem((ValueReader<Map<String, Object>>) (index, tile) -> tiles.add(tile));
StreamDelegate compatTilesDelegate = schematic.add("TileEntities");
compatTilesDelegate.withInfo((length, type) -> tiles = new ArrayList<>(length));
compatTilesDelegate.withElem((ValueReader<Map<String, Object>>) (index, tile) -> tiles.add(tile));
StreamDelegate entitiesDelegate = schematic.add("Entities");
entitiesDelegate.withInfo((length, type) -> entities = new ArrayList<>(length));
entitiesDelegate.withElem((ValueReader<Map<String, Object>>) (index, entity) -> entities.add(entity));

Datei anzeigen

@ -210,14 +210,14 @@ public class FastSchematicWriter implements ClipboardWriter {
}
if (numTiles != 0) {
out.writeNamedTagName("TileEntities", NBTConstants.TYPE_LIST);
out.writeNamedTagName("BlockEntities", NBTConstants.TYPE_LIST);
rawStream.write(NBTConstants.TYPE_COMPOUND);
rawStream.writeInt(numTiles);
try (LZ4BlockInputStream in = new LZ4BlockInputStream(new ByteArrayInputStream(tilesCompressed.toByteArray()))) {
IOUtil.copy(in, rawStream);
}
} else {
out.writeNamedEmptyList("TileEntities");
out.writeNamedEmptyList("BlockEntities");
}
if (finalClipboard.hasBiomes()) {