This repository was archived by the owner on Jul 8, 2023. It is now read-only.
Draft
Conversation
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.
//TODO Fix the ItemTypes for 1.18.30 when the whole Item system is updated
My IDE (IntelliJ) isn't complaining about this, so we'll just go along with that.
Refactor block placing
…d-behavior # Conflicts: # src/main/java/org/cloudburstmc/api/item/ItemTypes.java
…o refactor/items-and-behavior
…o refactor/items-and-behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
addLast("name", behavior)