This repository has been archived by the owner on Jul 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Refactor ItemStack and Behavior API #10
Draft
SupremeMortal
wants to merge
48
commits into
bleeding
Choose a base branch
from
refactor/items-and-behavior
base: bleeding
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
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
added
documentation
Improvements or additions to documentation
enhancement
New feature or request
labels
Oct 23, 2021
//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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
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)