Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

Update to 1.20.5

Open WalshyDev opened this issue 1 year ago • 16 comments
trafficstars

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 Nonnull and Nullable annotations 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

WalshyDev avatar May 05 '24 13:05 WalshyDev

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

github-actions[bot] avatar May 05 '24 13:05 github-actions[bot]

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.

WalshyDev avatar May 05 '24 13:05 WalshyDev

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

JustAHuman-xD avatar May 05 '24 13:05 JustAHuman-xD

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

WalshyDev avatar May 05 '24 14:05 WalshyDev

https://github.com/MockBukkit/MockBukkit/pull/1008

J3fftw1 avatar May 10 '24 17:05 J3fftw1

MockBukkit/MockBukkit#1008

PR is merged, time to have some progress?

ybw0014 avatar Jun 05 '24 12:06 ybw0014

A billion tests have failed

J3fftw1 avatar Jun 05 '24 16:06 J3fftw1

Java version issue by the look of the errors

JustAHuman-xD avatar Jun 05 '24 16:06 JustAHuman-xD

Ah I saw an open PR for that on mockbukkit

J3fftw1 avatar Jun 05 '24 16:06 J3fftw1

I think we need to bump Java up to 21 for tests since that's what mockbukkits Java is now... Could be wrong tho

JustAHuman-xD avatar Jun 05 '24 16:06 JustAHuman-xD

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.

md5sha256 avatar Aug 11 '24 09:08 md5sha256

the e2e tester also needs to be updated otherwise it will check against 1.21

J3fftw1 avatar Aug 11 '24 17:08 J3fftw1

putting the link to MockBukkit's basePotionType PR here: https://github.com/MockBukkit/MockBukkit/pull/1059

ybw0014 avatar Aug 11 '24 22:08 ybw0014

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...

md5sha256 avatar Aug 12 '24 10:08 md5sha256

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.

ybw0014 avatar Aug 12 '24 16:08 ybw0014

We would have to disable the unit test for 1.20.5 and 1.20.6 kinda annoying

J3fftw1 avatar Aug 12 '24 18:08 J3fftw1

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!

github-actions[bot] avatar Sep 09 '24 02:09 github-actions[bot]

Testing is done: https://discord.com/channels/565557184348422174/565570276038017044/1282538803940163584

Planned merge date: 9/10th Sept

WalshyDev avatar Sep 09 '24 03:09 WalshyDev