Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.20.6] Add GatherItemComponentsEvent #9944

Merged

Conversation

RealMangorage
Copy link
Contributor

This event allows you to add Components to Items thru the use of Events.

Example usage ->
https://gist.github.com/RealMangorage/07bb772edb570023fba9fefed1523cea

@autoforge autoforge bot added Triage This request requires the active attention of the Triage Team. Requires labelling or reviews. 1.20 Feature This request implements a new feature. New Event This request implements a new event. labels May 1, 2024
@autoforge autoforge bot requested a review from a team May 1, 2024 00:40
@LexManos
Copy link
Member

LexManos commented May 1, 2024

So, This seems like a good simple solution for adding generic modded components to Items.
However there is another side of this, allowing attaching of components that know the ItemStack reference. Such that those components can modify the stack when they change.
Think the old Cap system, ItemHandlers. How multiple implementations could be registered under the same ID, but have different backing logic.

Expanded on GatherComponentsEvent.java to be an abstract class.
@autoforge autoforge bot added the Needs Rebase This PR requires a rebase to implement upstream changes (usually to fix merge conflicts). label May 1, 2024
@autoforge
Copy link

autoforge bot commented May 1, 2024

@RealMangorage, this pull request has conflicts, please resolve them for this PR to move forward.

…-GatherComponentsPR

# Conflicts:
#	src/main/java/net/minecraftforge/event/ForgeEventFactory.java
@autoforge autoforge bot removed the Needs Rebase This PR requires a rebase to implement upstream changes (usually to fix merge conflicts). label May 1, 2024
@autoforge autoforge bot added the Needs Rebase This PR requires a rebase to implement upstream changes (usually to fix merge conflicts). label May 9, 2024
@autoforge
Copy link

autoforge bot commented May 9, 2024

@RealMangorage, this pull request has conflicts, please resolve them for this PR to move forward.

@autoforge autoforge bot removed the Needs Rebase This PR requires a rebase to implement upstream changes (usually to fix merge conflicts). label May 14, 2024
@LexManos LexManos merged commit 5da16e6 into MinecraftForge:1.20.x May 15, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20 Feature This request implements a new feature. New Event This request implements a new event. Triage This request requires the active attention of the Triage Team. Requires labelling or reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants