-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Added PlayerEvent.ItemSmithingEvent
#1693
Open
MeAlam1
wants to merge
12
commits into
neoforged:1.21.x
Choose a base branch
from
MeAlam1:PlayerSmithingEvent
base: 1.21.x
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.
+140
−12
Open
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7700460
Added the ItemSmithingEvent
MeAlam1 a3ce9b6
Reverted Back Breaking Changes
MeAlam1 9af14bc
Followed Contributing.md
MeAlam1 65ae5a2
Followed sciwhiz12 fix
MeAlam1 c1c50ee
Merge branch '1.21.x' into PlayerSmithingEvent
MeAlam1 7514bf3
Merge branch '1.21.x' into PlayerSmithingEvent
MeAlam1 12da915
Merge branch '1.21.x' into PlayerSmithingEvent
MeAlam1 73e72d3
Merge branch '1.21.x' into PlayerSmithingEvent
MeAlam1 2d01c58
Commented 3 Events
MeAlam1 386defe
Added some comments to the EventHooks
MeAlam1 8e3cee0
Fixed the formatting
MeAlam1 090aeb9
Merge branch '1.21.x' into PlayerSmithingEvent
MeAlam1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
patches/net/minecraft/world/inventory/SmithingMenu.java.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/net/minecraft/world/inventory/SmithingMenu.java | ||
+++ b/net/minecraft/world/inventory/SmithingMenu.java | ||
@@ -72,6 +_,7 @@ | ||
protected void onTake(Player p_150663_, ItemStack p_150664_) { | ||
p_150664_.onCraftedBy(p_150663_.level(), p_150663_, p_150664_.getCount()); | ||
this.resultSlots.awardUsedRecipes(p_150663_, this.getRelevantItems()); | ||
+ net.neoforged.neoforge.event.EventHooks.firePlayerSmithingEvent(p_150663_, this.inputSlots.getItem(0), this.inputSlots.getItem(1), this.inputSlots.getItem(2), p_150664_); | ||
this.shrinkStackInSlot(0); | ||
this.shrinkStackInSlot(1); | ||
this.shrinkStackInSlot(2); |
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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to see some documentation on this class. Most of our events should have a javadoc explaining:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, i will see to this asap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have been completely resolved!
I will not close this conversation since i do not want to hide it before it has been confirmed by a Maintainer