Slimefun / Slimefun4

Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
GNU General Public License v3.0
958 stars 547 forks source link

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

Closed WalshyDev closed 6 months ago

WalshyDev commented 6 months ago

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

github-actions[bot] commented 6 months ago

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

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Issues
15 New issues

Measures
0 Security Hotspots
88.9% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 6 months ago

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!

WalshyDev commented 6 months ago

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.