Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reading of tile entities with "id" instead of "Id" tag #2211

Merged

Conversation

Foorcee
Copy link
Contributor

@Foorcee Foorcee commented May 5, 2023

Regression of #1220

Overview

If a schematic contains a tile entity with an "id" instead of an "Id" the previous code would delete the id. The changed code checks which one of the tags is set.

This schematic for example caused this exception:
http://paste.cytooxien.de/ezezeqapek.bash

Submitter Checklist

  • Make sure you are opening from a topic branch (/feature/fix/docs/ branch (right side)) and not your main branch.
  • Ensure that the pull request title represents the desired changelog entry.
  • New public fields and methods are annotated with @since TODO.
  • I read and followed the contribution guidelines.

@Foorcee Foorcee requested a review from a team as a code owner May 5, 2023 09:56
@github-actions github-actions bot added Bugfix This PR fixes a bug Feature This PR adds a new feature labels May 5, 2023
@TheMeinerLP
Copy link
Contributor

Can you maybe add a check for fallback ?
That could prevent breaking changes.

Copy link
Member

@PierreSchwang PierreSchwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure why we support "old and corrupted" schematics in first place, as a lowercase Id key was never part of the Sponge Schematic Specification - but as this was already part of the logic before your PR I'm gonna approve that.

@NotMyFault NotMyFault requested review from dordsor21 and a team May 5, 2023 10:59
@MattBDev
Copy link
Contributor

MattBDev commented May 5, 2023

I'm not really sure why we support "old and corrupted" schematics in first place, as a lowercase Id key was never part of the Sponge Schematic Specification - but as this was already part of the logic before your PR I'm gonna approve that.

We support them because at one point in FAWE’s past, the plug-in created corrupted schematics.

@NotMyFault
Copy link
Member

I'm with Matt and @dordsor21's previous comment.

@dordsor21 dordsor21 enabled auto-merge (squash) May 20, 2023 09:44
@dordsor21 dordsor21 merged commit 5272343 into IntellectualSites:main May 20, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug Feature This PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants