-
Notifications
You must be signed in to change notification settings - Fork 549
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
fix geo miner voiding resources #3953
fix geo miner voiding resources #3953
Conversation
Your Pull Request was automatically labelled as: "✨ Fix" |
Slimefun preview buildA Slimefun preview build is available for testing! https://preview-builds.walshy.dev/download/Slimefun/3953/df1e6024
|
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/operations/MiningOperation.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/core/machines/MachineOperation.java
Outdated
Show resolved
Hide resolved
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 wonder if this on cancel could potentially be used to fix the recipes in machines getting voided on server stop/restart
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java
Outdated
Show resolved
Hide resolved
...in/java/io/github/thebusybiscuit/slimefun4/implementation/operations/GEOMiningOperation.java
Outdated
Show resolved
Hide resolved
Co-authored-by: JustAHuman-xD <[email protected]>
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/geo/GEOMiner.java
Outdated
Show resolved
Hide resolved
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.
LGTM
Probably yes, if made correctly. If we add the |
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.
LGTM
Description
When breaking a geo miner the resource it was currently mining would get voided.
Proposed changes
Write logic for
MachineOperation
s to allow for behavior to be implemented when aMachineOperation
is interrupted without finishing. Use this to return the resource to the chunk when aMiningOperation
is interrupted.I also fixed annotations and Preconditions in the affected classes.
Related Issues (if applicable)
N/A
Checklist
Nonnull
andNullable
annotations to my methods to indicate their behaviour for null values