Conversation
8c8e5cb to
9b8106c
Compare
9b8106c to
4167b07
Compare
|
My approach with having a negative filter on the |
4167b07 to
1049aa3
Compare
adjusted - though I'm unsure if .mce and .mcedit should be "allowed" for sponge v1 |
Those have been allowed from the very start so I assume those files are v1 format? |
I do think those formats differ quite significantly. MCEdit should have a Material tag, whereas V1 already uses the Palette tag. But I also just read, that v1 uses - or rather recommends - the .schem extension as well. So I should update the PR. |
|
I've adjusted the file extension check. I also reworked the findByFile method itself, as it previously had to open multiple stream and check against multiple formats after another when loading older formats. The new approach should be quicker, may it be a little bit quirkier. Not 100% sure if I like it. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a regression in schematic format detection where Sponge v1 schematics were incorrectly being delegated to the MCEdit format check, causing format misidentification.
- Implements optimized format detection algorithm for built-in clipboard formats
- Adds comprehensive test coverage for format detection functionality
- Updates dependency version for Paper dev bundle
Reviewed Changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ClipboardFormats.java | Implements fast format detection algorithm with NBT parsing to correctly identify schematic formats |
| BuiltInClipboardFormat.java | Fixes SPONGE_V1_SCHEMATIC format detection by preventing delegation to MCEDIT format |
| ClipboardFormatsTest.java | Adds comprehensive test cases for format detection including custom format registration |
| custom_format.xyz | Test file for custom format detection testing |
| build.gradle.kts | Updates Paper dev bundle dependency version |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Please take a moment and address the merge conflicts of your pull request. Thanks! |
1 similar comment
|
Please take a moment and address the merge conflicts of your pull request. Thanks! |
Overview
Fixes IntellectualSites/PlotSquared#4478
fixes regression by bf07548 which resulted in format check of sponge v1 schematics to delegate to mcedit format check.
Submitter Checklist
@since TODO.