Slimefun4
Slimefun4 copied to clipboard
Update to 1.20.5
Description
Relatively easy update just a bunch of enum changes for which we can just provide a compatible API for.
Proposed changes
Created a bunch of VersionedX classes, I don't really like this but it works for now. Ideally, we build a proper mapping system but for now, I think this is fine. These names have been wrong a long time, I don't see them changing much from here.
Related Issues (if applicable)
N/A
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
NonnullandNullableannotations to my methods to indicate their behaviour for null values - [ ] I added sufficient Unit Tests to cover my code.
Still to do
- [ ] Test on 1.20.4
- [ ] Test on 1.20.6
- Currently this is failing on Paper, I think Spigot should be fine
- [ ] Ensure tests pass
Your Pull Request was automatically labelled as: "🧹 Chores" Thank you for contributing to this project! ❤️
Also should this be something we maybe put in dough instead of SF itself?
MinecraftVersion or the versioned stuff? We have a MinecraftVersion in dough, just not with the actual MC vers. The versioned classes, maybe but I don't intend for them to be around forever or widely used.
Also should this be something we maybe put in dough instead of SF itself?
MinecraftVersion or the versioned stuff? We have a MinecraftVersion in dough, just not with the actual MC vers. The versioned classes, maybe but I don't intend for them to be around forever or widely used.
I was meaning the versioned stuff but yeah if they're temp then it's probably fine
Tests are due to mix of 1.20.6 and 1.20.4, will wait for MockBukkit
This looks alright to me on 1.20.4, not tested 1.20.6 yet since Paper is broken
https://github.com/MockBukkit/MockBukkit/pull/1008
A billion tests have failed
Java version issue by the look of the errors
Ah I saw an open PR for that on mockbukkit
I think we need to bump Java up to 21 for tests since that's what mockbukkits Java is now... Could be wrong tho
Okay so tests now compiled on Java 21 (main sources still compile agains 16) and the mockbukkit version. I've also fixed the merge conflict so now all thats left for the tests to pass is dough... not entirely sure how to fix this. The ItemUtils class doesn't compile on 1.20.5+ due to the enchantments constants changes. So unless dough adopts some sort of Versioned enchantment, we'd have to make dough support 1.20.5+ exclusively for this to work.
the e2e tester also needs to be updated otherwise it will check against 1.21
putting the link to MockBukkit's basePotionType PR here: https://github.com/MockBukkit/MockBukkit/pull/1059
putting the link to MockBukkit's basePotionType PR here: MockBukkit/MockBukkit#1059
the PR targets 1.21 though, we won't be able to use it until then...
We should probably temporarily disable the tests that use the base potion type. When we work on 1.21, we re-enable and fix those tests.
We would have to disable the unit test for 1.20.5 and 1.20.6 kinda annoying
Slimefun preview build
A Slimefun preview build is available for testing! Commit: 00544df8
https://preview-builds.walshy.dev/download/Slimefun/4186/00544df8
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!
Testing is done: https://discord.com/channels/565557184348422174/565570276038017044/1282538803940163584
Planned merge date: 9/10th Sept
Quality Gate passed
Issues
50 New issues
0 Accepted issues
Measures
0 Security Hotspots
44.9% Coverage on New Code
0.0% Duplication on New Code