Skip to content

Add MultiBlockCraftEvent (Updated version of #3439)#3928

Merged
WalshyDev merged 4 commits into
Slimefun:masterfrom
JustAHuman-xD:api/multiblock-craft-event
Nov 21, 2023
Merged

Add MultiBlockCraftEvent (Updated version of #3439)#3928
WalshyDev merged 4 commits into
Slimefun:masterfrom
JustAHuman-xD:api/multiblock-craft-event

Conversation

@JustAHuman-xD

@JustAHuman-xD JustAHuman-xD commented Jul 29, 2023

Copy link
Copy Markdown
Contributor

Description

Making this PR to resolve the Merge Conflicts of #3439 and change some aspects of the PR

Proposed changes

  • Added MultiBlockCraftEvent an event called whenever a player uses a core slimefun multiblock to craft something
    • It is cancellable and provides the listener with the player, machine, inputs and output
    • a listener can also set the output if they so desire
  • Changed all relevant classes to use MultiBlockCraftEvent

Related Issues (if applicable)

N/A

Checklist

  • I have fully tested the proposed changes and promise that they will not break everything into chaos.
  • I have also tested the proposed changes in combination with various popular addons and can confirm my changes do not break them.
  • I have made sure that the proposed changes do not break compatibility across the supported Minecraft versions (1.16.* - 1.20.*).
  • I followed the existing code standards and didn't mess up the formatting.
  • I did my best to add documentation to any public classes or methods I added.
  • I have added Nonnull and Nullable annotations to my methods to indicate their behaviour for null values
  • I added sufficient Unit Tests to cover my code.

@JustAHuman-xD
JustAHuman-xD requested a review from a team as a code owner July 29, 2023 22:50
@github-actions github-actions Bot added the 🔧 API This Pull Request introduces API changes. label Jul 29, 2023
@github-actions

Copy link
Copy Markdown
Contributor

Your Pull Request was automatically labelled as: "🔧 API"
Thank you for contributing to this project! ❤️

@github-actions

github-actions Bot commented Jul 29, 2023

Copy link
Copy Markdown
Contributor

Slimefun preview build

A Slimefun preview build is available for testing!
Commit: 5ce7afca

https://preview-builds.walshy.dev/download/Slimefun/3928/5ce7afca

Note: This is not a supported build and is only here for the purposes of testing.
Do not run this on a live server and do not report bugs anywhere but this PR!

@JustAHuman-xD JustAHuman-xD added the 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. label Jul 29, 2023
@variananora

Copy link
Copy Markdown
Member

How should I approach to test this? I'm quite confused on how to tested this in game without any third party plugin that cancel/modify stuff

@JustAHuman-xD

Copy link
Copy Markdown
Contributor Author

How should I approach to test this? I'm quite confused on how to tested this in game without any third party plugin that cancel/modify stuff

Tomorrow I can see if I have time to make a plug-in to test this all with, for now you could just test that i didn't break anything just by adding the events?

@variananora

Copy link
Copy Markdown
Member

Okay will do two part testing then, the first one being the gameplay functionality is still intact and working and the second one is being the API can be called correctly. Thanks JustAHuman

@JustAHuman-xD

Copy link
Copy Markdown
Contributor Author

Okay will do two part testing then, the first one being the gameplay functionality is still intact and working and the second one is being the API can be called correctly. Thanks JustAHuman

No problem! Thanks for all of the testing it's honestly a god send 👏👏👏

@variananora variananora added Build tested Used to indicate the PR preview build has been tested by one of the team and removed 🎯 Needs testing This Issue needs to be tested by our team to see if it can be reproduced. labels Aug 1, 2023
@variananora

Copy link
Copy Markdown
Member

Just tested this on 1.20.1 and it works flawlessly!

Here is a little plugin that I created to listen the event. /slimefuntest to change cancel event or change the output

Video: https://youtu.be/KeFTSsPqJZo

@JustAHuman-xD

Copy link
Copy Markdown
Contributor Author

Just tested this on 1.20.1 and it works flawlessly!

Here is a little plugin that I created to listen the event. /slimefuntest to change cancel event or change the output

Video: https://youtu.be/KeFTSsPqJZo

Oh my gosh I completely forgot about this I'm sorry! Looks like you did it yourself which is awesome but sorry I forgot

@variananora

Copy link
Copy Markdown
Member

Oh my gosh I completely forgot about this I'm sorry! Looks like you did it yourself which is awesome but sorry I forgot

It's okay! It's an opportunity for me to code in Java and Spigot-API thinggy tho, lol

@JustAHuman-xD JustAHuman-xD mentioned this pull request Aug 5, 2023
6 tasks

@Sefiraat Sefiraat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@WalshyDev
WalshyDev merged commit 6341403 into Slimefun:master Nov 21, 2023
StarWishsama pushed a commit to SlimefunGuguProject/Slimefun4 that referenced this pull request Dec 4, 2023
* e2e testing initial

* Setup matrix

* Download tester

* Jeff's changes

* capitalized Chosen

* Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.1

* fix breaking sf block with not unlocked item duping contents (Slimefun#3976)

* [CI skip] Update actions/setup-java action to v3.13.0

* [CI skip] Update dependency me.clip:placeholderapi to v2.11.4

* [CI skip] Update actions/checkout action to v4

* [CI skip] Update dependency com.github.LoneDev6:itemsadder-api to v3.5.0c-r5

* [CI skip] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.6.0

* [CI skip] Update dependency org.sonarsource.scanner.maven:sonar-maven-plugin to v3.10.0.2594

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-core to v7.2.16

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-bukkit to v7.2.16

* [CI skip] Update dependency com.gmail.nossr50.mcMMO:mcMMO to v2.1.224

* [CI skip] Update dependency org.mockito:mockito-core to v5.6.0

* updated dough version (Slimefun#3991)

* [CI skip] Update dependency com.github.LoneDev6:itemsadder-api to v3.6.1

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-core to v7.2.17

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-bukkit to v7.2.17

* [CI skip] Update dependency com.gmail.nossr50.mcMMO:mcMMO to v2.1.225

* [CI skip] Update dependency org.jacoco:jacoco-maven-plugin to v0.8.11

* [CI skip] Update actions/checkout action to v4.1.1

* [CI skip] Update thollander/actions-comment-pull-request action to v2.4.3

* [CI skip] Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.1

* [CI skip] Update dependency me.clip:placeholderapi to v2.11.5

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* Add MultiBlockCraftEvent (Updated version of Slimefun#3439) (Slimefun#3928)

* fix taking damage on head collision while wearing elytra cap (Slimefun#3760)

* Remove Lore Check from Slimefun Guide (Slimefun#3969)

* don't consume bookbinder inputs if the output is worse than the input (Slimefun#3925)

Co-authored-by: Jeroen <j.teriele1@students.uu.nl>

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* fix heads showing as steve (Slimefun#4027)

* fix: clean up issues after merging

* chore(style): apply code style

---------

Co-authored-by: Jeffrey <jeffrey@kosse.me>
Co-authored-by: Daniel Walsh <walshydev@gmail.com>
Co-authored-by: iTwins <teriele.jeroen@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jeroen <48769316+iTwins@users.noreply.github.com>
Co-authored-by: TheBusyBiscuit <TheBusyBiscuit@users.noreply.github.com>
Co-authored-by: J3fftw <44972470+J3fftw1@users.noreply.github.com>
Co-authored-by: JustAHuman-xD <65748158+JustAHuman-xD@users.noreply.github.com>
Co-authored-by: Jeroen <j.teriele1@students.uu.nl>
Co-authored-by: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com>
StarWishsama pushed a commit to SlimefunGuguProject/Slimefun4 that referenced this pull request Jan 1, 2024
* e2e testing initial

* Setup matrix

* Download tester

* Jeff's changes

* capitalized Chosen

* Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.5.1

* fix breaking sf block with not unlocked item duping contents (Slimefun#3976)

* [CI skip] Update actions/setup-java action to v3.13.0

* [CI skip] Update dependency me.clip:placeholderapi to v2.11.4

* [CI skip] Update actions/checkout action to v4

* [CI skip] Update dependency com.github.LoneDev6:itemsadder-api to v3.5.0c-r5

* [CI skip] Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.6.0

* [CI skip] Update dependency org.sonarsource.scanner.maven:sonar-maven-plugin to v3.10.0.2594

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-core to v7.2.16

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-bukkit to v7.2.16

* [CI skip] Update dependency com.gmail.nossr50.mcMMO:mcMMO to v2.1.224

* [CI skip] Update dependency org.mockito:mockito-core to v5.6.0

* updated dough version (Slimefun#3991)

* [CI skip] Update dependency com.github.LoneDev6:itemsadder-api to v3.6.1

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-core to v7.2.17

* [CI skip] Update dependency com.sk89q.worldedit:worldedit-bukkit to v7.2.17

* [CI skip] Update dependency com.gmail.nossr50.mcMMO:mcMMO to v2.1.225

* [CI skip] Update dependency org.jacoco:jacoco-maven-plugin to v0.8.11

* [CI skip] Update actions/checkout action to v4.1.1

* [CI skip] Update thollander/actions-comment-pull-request action to v2.4.3

* [CI skip] Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.2.1

* [CI skip] Update dependency me.clip:placeholderapi to v2.11.5

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* Add MultiBlockCraftEvent (Updated version of Slimefun#3439) (Slimefun#3928)

* fix taking damage on head collision while wearing elytra cap (Slimefun#3760)

* Remove Lore Check from Slimefun Guide (Slimefun#3969)

* don't consume bookbinder inputs if the output is worse than the input (Slimefun#3925)

Co-authored-by: Jeroen <j.teriele1@students.uu.nl>

* Update .github/workflows/e2e-testing.yml

* Update .github/workflows/e2e-testing.yml

* fix heads showing as steve (Slimefun#4027)

* fix: clean up issues after merging

* chore(style): apply code style

---------

Co-authored-by: Jeffrey <jeffrey@kosse.me>
Co-authored-by: Daniel Walsh <walshydev@gmail.com>
Co-authored-by: iTwins <teriele.jeroen@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jeroen <48769316+iTwins@users.noreply.github.com>
Co-authored-by: TheBusyBiscuit <TheBusyBiscuit@users.noreply.github.com>
Co-authored-by: J3fftw <44972470+J3fftw1@users.noreply.github.com>
Co-authored-by: JustAHuman-xD <65748158+JustAHuman-xD@users.noreply.github.com>
Co-authored-by: Jeroen <j.teriele1@students.uu.nl>
Co-authored-by: Alessio Colombo <37039432+Sfiguz7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 API This Pull Request introduces API changes. Build tested Used to indicate the PR preview build has been tested by one of the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants