Small fix

This commit is contained in:
Runemoro 2017-12-09 19:31:14 -05:00
parent c976a3d88e
commit 48a003012a

View file

@ -137,8 +137,11 @@ public class SchematicHandler {
if (streamOpened) { if (streamOpened) {
try { try {
schematicNBT = CompressedStreamTools.readCompressed(schematicDataStream); schematicNBT = CompressedStreamTools.readCompressed(schematicDataStream);
if (!schematicNBT.hasKey("Version")) schematic = SchematicConverter.loadOldDimDoorSchematicFromNBT(schematicNBT, template.getName()); if (!schematicNBT.hasKey("Version")) {
schematic = SchematicConverter.loadOldDimDoorSchematicFromNBT(schematicNBT, template.getName());
} else {
schematic = Schematic.loadFromNBT(schematicNBT, template.getName()); schematic = Schematic.loadFromNBT(schematicNBT, template.getName());
}
schematicDataStream.close(); schematicDataStream.close();
} catch (IOException ex) { } catch (IOException ex) {
Logger.getLogger(SchematicHandler.class.getName()).log(Level.SEVERE, "Schematic file for " + template.getName() + " could not be read as a valid schematic NBT file.", ex); Logger.getLogger(SchematicHandler.class.getName()).log(Level.SEVERE, "Schematic file for " + template.getName() + " could not be read as a valid schematic NBT file.", ex);