Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Refactor ItemStack and Behavior API #10

Draft
wants to merge 48 commits into
base: bleeding
Choose a base branch
from

Conversation

SupremeMortal
Copy link
Member

@SupremeMortal SupremeMortal commented Oct 23, 2021

Make the Item APIs less dependant on the server module and allow individual behaviour methods to be modified without needing to override the entire class.

TODO

  • Implement support for adding behaviours in between others. e.g. addLast("name", behavior)

This should make modification of block and item behaviours far easier as well as changing data within ItemStack. It also allows for different types to be declared for when the data is being mutated in a builder class.
Each behaviour key needs to have access to the Behavior class so it can call other behaviours or call its parent.
Ended up removing all the generic functions in util.function since the amount of generic parameters did not look nice.
This was a dirty hack for the old behaviour format that can now be removed.
@SupremeMortal SupremeMortal added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants