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

Fixes #4123 - Coal Generator will no longer be locked after researching #4124

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

WalshyDev
Copy link
Member

Description

Due to a logic bug in the Legacy storage backend if there was a duplicate ID it would mark it as researched for the first, then see it researched already and remove it on the second. This was happening for the Coal Generator and Bio Reactor here. Both shared he same research ID 173.

We're just doing this fix for now until we can move away from the legacy backend (work in progress).

Proposed changes

If we already see the value as researched in the file just double-check that the player does not have it researched.

This change also needed us to pin Paper due to a Paper PR that caused MockBukkit to fail. Not a fan of this but it should only be temporary until MockBukkit updates.
I hate that we always use a "1.x" version which versions are pushed to... Everyone really should always pin to just specific versions to avoid these kinda problems. But that's another topic for another day.

Related Issues (if applicable)

Fixes #4123

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

Due to a logic bug in the Legacy storage backend if there was a duplicate ID it would mark it as researched for the first, then see it researched already and remove it on the second. This was happening for the Coal Generator and Bio Reactor here. Both shared he same research ID 173.

We're just doing this fix for now until we can move away from the legacy backend (work in progress).
@WalshyDev WalshyDev requested review from a team as code owners February 10, 2024 00:08
@github-actions github-actions bot added the ✨ Fix This Pull Request fixes an issue. label Feb 10, 2024
Copy link
Contributor

Your Pull Request was automatically labelled as: "✨ Fix"
Thank you for contributing to this project! ❤️

Copy link

sonarcloud bot commented Feb 10, 2024

Copy link
Contributor

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: d818fa1f

https://preview-builds.walshy.dev/download/Slimefun/4124/d818fa1f

Note: This is not a supported build and is only here for the purposes of testing.
Do not run this on a live server and do not report bugs anywhere but this PR!

Copy link
Member

@Sfiguz7 Sfiguz7 left a comment

Choose a reason for hiding this comment

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

Sigh

@Sfiguz7 Sfiguz7 self-assigned this Feb 10, 2024
@Boomer-1 Boomer-1 added the Build tested Used to indicate the PR preview build has been tested by one of the team label Feb 10, 2024
Copy link
Contributor

@J3fftw1 J3fftw1 left a comment

Choose a reason for hiding this comment

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

Not a fan of doing this imo we should just change the id. We can still have this patch for future errors but this patch shouldn’t be needed

@WalshyDev
Copy link
Member Author

WalshyDev commented Feb 10, 2024

It's a hard no on changing the ID. This has been this way for years, I just want to get rid of these IDs. They'll be gone soon, let's deal with it for now.

@WalshyDev WalshyDev merged commit 98bc59e into master Feb 10, 2024
19 checks passed
@WalshyDev WalshyDev deleted the fix/duplicate-research-id-causing-reset branch February 10, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build tested Used to indicate the PR preview build has been tested by one of the team ✨ Fix This Pull Request fixes an issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When researching coal generator, if you leave and rejoin after save, coal generator is un-researched
4 participants