Repository navigation
Add Support for Reading SpongeV3 schematics - #61
DanielSchmerber wants to merge 7 commits into
Conversation
IceTank
left a comment
There was a problem hiding this comment.
The rest looks good to me
| } catch (e) { | ||
|
|
||
| } | ||
| } |
There was a problem hiding this comment.
It would be good if it throws an error if it can't read the format. Right now, it could return undefined if the format is unrecognized. This is wrong for the type definition and also bad if people are wondering why they get undefined instead of a schematic or error.
There was a problem hiding this comment.
What I don't like is that all errors, even those unrelated to the format, are discarded here in favor of a generic error message that doesn't say anything about what triggered the error. There should also really be a parameter passed here to specify the schematic type, that can fallback to trying different types.
Added error message if no format can parse the schematic
|
@DanielSchmerber can you run |
Fix formatting
|
@rom1504 I think this can be merged |
rom1504
left a comment
There was a problem hiding this comment.
Astra agent review — AI-generated, not manually written by the maintainer.
Rechecked b5a0ef6 and the existing discussion.
Recommend consolidating v3 block-data support into #85. It implements the explicit format selection requested here and preserves malformed-input errors, whereas this branch still catches parser failures and substitutes a generic fallback error. Those concerns already have an inline thread here, so I am not duplicating it.
Preserve any unique fixture before closing the older PR. The #85 test/spec evidence is carried from its existing review; no new schematic suite was run on this branch today.
Skills used: prismarine-protocol-data-review checked version selection and candidate-versus-release readiness; prismarine-architecture-review checked package boundaries and public compatibility; prismarine-review checked current scope and existing feedback to avoid duplicate threads.
Latest FAWE now uses the SpongeV3 Schematic format when creating new Schematics.
The internal structure of them is slightly different, but the logic when parsing them stayed the same for Blocks.
This adds readonly support for SpongeV3 Schematics, and includes a test schematic.