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.19.2, Suggestion] Event for Armor Breaking #30

Open
ZestyBlaze opened this issue Jan 18, 2023 · 5 comments
Open

[1.19.2, Suggestion] Event for Armor Breaking #30

ZestyBlaze opened this issue Jan 18, 2023 · 5 comments
Labels
suggestion Request for a change or a feature

Comments

@ZestyBlaze
Copy link
Contributor

Hey! Is it possible for an event to be added that triggers when an item piece breaks. I feel like this can be useful for armor or tools or something where you want something to happen when it breaks or it too be replaced with a different item when it breaks

@AlphaMode
Copy link
Member

You can always pr some :P

@TropheusJ
Copy link
Member

does forge have one?

@ZestyBlaze
Copy link
Contributor Author

I don't believe so
And trust me, if I could figure out the point to add the event I'd be pushing this event personally XD

@TropheusJ
Copy link
Member

out of scope for Porting Lib then

@ZestyBlaze
Copy link
Contributor Author

ZestyBlaze commented Jan 18, 2023

Wait nevermind they do:
https://github.com/MinecraftForge/MinecraftForge/blob/1.19.x/src/main/java/net/minecraftforge/event/entity/player/PlayerDestroyItemEvent.java
That seems to trigger when an item is destroyed through most means and gives you the hand that destroyed it was destroyed in and the original item that was destroyed
Weirdly not the player tho

@TropheusJ TropheusJ reopened this Jan 18, 2023
@TropheusJ TropheusJ added the suggestion Request for a change or a feature label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion Request for a change or a feature
Projects
None yet
Development

No branches or pull requests

3 participants