Slimefun4 icon indicating copy to clipboard operation
Slimefun4 copied to clipboard

[DRAFT] Move away from dough's CustomItemStack

Open md5sha256 opened this issue 1 year ago • 1 comments

Description

I can't make this a draft PR but treat this as such. Adds a paper-dependent replacement for CustomItemStack. Fixes issues with "class cast exception ... is not a CraftItemStack" due to usages of CustomItemStack.

This should be refactored into dough but i've made a PR here just to see the damage. A suggested solution by @Intybyte is to keep the existing CustomItemStack constructors and then add some sort of .getDelegate or build() method. In any case, all existing usages will cause compile errors.

Proposed changes

Related Issues (if applicable)

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.*).
  • [x] I followed the existing code standards and didn't mess up the formatting.
  • [x] I did my best to add documentation to any public classes or methods I added.
  • [x] 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.

md5sha256 avatar Oct 01 '24 08:10 md5sha256

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

github-actions[bot] avatar Oct 01 '24 08:10 github-actions[bot]