Skip invalid blocks in schematics.

Dieser Commit ist enthalten in:
wizjany 2019-08-04 15:56:16 -04:00
Ursprung df9d766eb3
Commit 4b54c32f3a

Datei anzeigen

@ -48,6 +48,7 @@ import com.sk89q.worldedit.world.DataFixer;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.BiomeTypes;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.entity.EntityType;
import com.sk89q.worldedit.world.entity.EntityTypes;
import com.sk89q.worldedit.world.storage.NBTConversions;
@ -184,8 +185,8 @@ public class SpongeSchematicReader extends NBTSchematicReader {
try {
state = WorldEdit.getInstance().getBlockFactory().parseFromInput(palettePart, parserContext).toImmutableState();
} catch (InputParseException e) {
throw new IOException("Invalid BlockState in palette: " + palettePart +
". Are you missing a mod or using a schematic made in a newer version of Minecraft?");
log.warn("Invalid BlockState in palette: " + palettePart + ". Block will be replaced with air.");
state = BlockTypes.AIR.getDefaultState();
}
palette.put(id, state);
}