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

Added PlayerEvent.ItemSmithingEvent #1693

Open
wants to merge 7 commits into
base: 1.21.x
Choose a base branch
from

Conversation

MeAlam1
Copy link

@MeAlam1 MeAlam1 commented Nov 18, 2024

This PR allows users to create an event solely related to the Smithing Table, This will allow developers to retrieve information like the Template used, the main item and the addition.

Currently there is no event that triggers when a user crafts something using the smithing table.
With this PR we will have that event which will allow developers to have more freedom when developing features around the Smithing Table.

Adds #1569.

@CLAassistant
Copy link

CLAassistant commented Nov 18, 2024

CLA assistant check
All committers have signed the CLA.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

Executed
```
Run gradlew genPatches to generate patch-files from the patched sources
Run gradlew applyAllFormatting to automatically format sources
Check correct formatting with gradlew spotlessCheck
```
@MeAlam1
Copy link
Author

MeAlam1 commented Nov 18, 2024

For when anyone reads this PR

I followed the steps in CONTRIBUTING.md

But when i execute

Run gradlew genPatches to generate patch-files from the patched sources
Run gradlew applyAllFormatting to automatically format sources
Check correct formatting with gradlew spotlessCheck

It Modifies more files then what i intend with my PR and it breaks?

@sciwhiz12
Copy link
Member

In your case, you likely:

  1. Updated your local 1.21.x branch and ran the setup task.
  2. Did your changes to the source files under projects/neoforge.
  3. Updated your local 1.21.x branch but did not run the setup task.
  4. Ran genPatches then committed.

What you're seeing is the result of having your source files (which the patch files are based off) not being in sync with your patch files.

Whenever you update your local repository's main branch (1.21.x in this case) to match upstream, the next thing you should always do is to run setup. Never update your main branch without running setup, as otherwise your workspace will contain elements from before and after updating the branch. (And never update the main branch and run setup without first having generated patches beforehand to save your work under projects/neoforge.)

@sciwhiz12
Copy link
Member

To fix the issue, you can either:

  1. Begin anew on a new branch based off 1.21.x, do your changes there, generate patches, commit, and then force-push that new branch to your repository's PR branch such as git push --force origin my-new-branch:PlayerSmithingEvent;
  2. Edit your commits via git rebase -i or git commit --amend to remove the unwanted changes to the patch files, and then immediately afterwards do a setup to sync the patch files to the source code; or
  3. Manually restore the patch files in your local environment to how they are in the current upstream repository, then run setup to sync the patch files to the source code.

@MeAlam1
Copy link
Author

MeAlam1 commented Nov 18, 2024

Thank you for explaining!

I will resolve this issue as soon as possible.

* Resolved the issue
@MeAlam1
Copy link
Author

MeAlam1 commented Nov 18, 2024

I have resolved the issue using:

Manually restore the patch files in your local environment to how they are in the current upstream repository, then run setup to sync the patch files to the source code.

Thank you very much for helping me so quickly.

@sciwhiz12 sciwhiz12 added enhancement New (or improvement to existing) feature or request 1.21.3 Targeted at Minecraft 1.21.3 labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.3 Targeted at Minecraft 1.21.3 enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants