feat: add litematica error when failing to load schematic (#2850)

* feat: add litematica error when failing to load schematic

* Adjust
This commit is contained in:
Jordan 2024-07-27 10:34:25 +02:00 committed by GitHub
parent dac7cdbe4b
commit 6fb0102e85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -247,7 +247,7 @@ public class FastSchematicReaderV2 extends NBTSchematicReader {
throw new IOException("This schematic version is not supported; Version: " + version
+ ", DataVersion: " + dataVersion + ". It's very likely your schematic has an invalid file extension," +
" if the schematic has been created on a version lower than 1.13.2, the extension MUST be `.schematic`," +
" elsewise the schematic can't be read properly.");
" elsewise the schematic can't be read properly. If you are using a litematica schematic, it is not supported!");
}
if (blocks != null) {

View File

@ -421,6 +421,9 @@ public class SchematicCommands {
} catch (URISyntaxException | IOException e) {
actor.print(Caption.of("worldedit.schematic.file-not-exist", TextComponent.of(Objects.toString(e.getMessage()))));
LOGGER.warn("Failed to load a saved clipboard", e);
} catch (Exception e) {
actor.print(Caption.of("fawe.worldedit.schematic.schematic.load-failure", TextComponent.of(e.getMessage())));
LOGGER.error("Error loading a schematic", e);
} finally {
if (in != null) {
try {

View File

@ -68,7 +68,7 @@
"fawe.worldedit.schematic.schematic.loaded": "{0} loaded. Paste it with //paste",
"fawe.worldedit.schematic.schematic.saved": "{0} saved.",
"fawe.worldedit.schematic.schematic.none": "No files found.",
"fawe.worldedit.schematic.schematic.load-failure": "File could not be read or it does not exist: {0}. If you are specifying a format, you may not be specifying the correct one. Sponge schematic v2 and v3 both use the .schem file extension. To allow FAWE to select the format, do not specify one.",
"fawe.worldedit.schematic.schematic.load-failure": "File could not be read or it does not exist: {0}. If you are specifying a format, you may not be specifying the correct one. Sponge schematic v2 and v3 both use the .schem file extension. To allow FAWE to select the format, do not specify one. If you are using a litematica schematic, it is not supported!",
"fawe.worldedit.clipboard.clipboard.uri.not.found": "You do not have {0} loaded",
"fawe.worldedit.clipboard.clipboard.cleared": "Clipboard cleared",
"fawe.worldedit.clipboard.clipboard.invalid.format": "Unknown clipboard format: {0}",
@ -360,7 +360,7 @@
"worldedit.schematic.unknown-format": "Unknown schematic format: {0}.",
"worldedit.schematic.load.does-not-exist": "Schematic {0} does not exist!",
"worldedit.schematic.load.loading": "(Please wait... loading schematic.)",
"worldedit.schematic.load.unsupported-version": "This schematic is not supported. Version: {0}.",
"worldedit.schematic.load.unsupported-version": "This schematic is not supported. Version: {0}. If you are using a litematica schematic, it is not supported!",
"worldedit.schematic.save.already-exists": "That schematic already exists. Use the -f flag to overwrite it.",
"worldedit.schematic.save.failed-directory": "Could not create folder for schematics!",
"worldedit.schematic.save.saving": "(Please wait... saving schematic.)",