Slimefun4
Slimefun4 copied to clipboard
[DRAFT] Move away from dough's CustomItemStack
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
NonnullandNullableannotations to my methods to indicate their behaviour for null values - [ ] I added sufficient Unit Tests to cover my code.
Your Pull Request was automatically labelled as: "🎈 Feature" Thank you for contributing to this project! ❤️