-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only if the resource could no longer be extracted, try trigger autocrafting. I tried to reuse shift clicking for this to force autocrafting, but shift is already used to only extract one of a resource. You have to wait 250ms until the last extract to trigger autocrafting as attack method from block might be called very often, and we don't want open the autocrafting window when it's not needed (eg right after an extract).
- Loading branch information
1 parent
1b3a43e
commit 2a2ffc5
Showing
34 changed files
with
372 additions
and
100 deletions.
There are no files selected for viewing
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
6 changes: 6 additions & 0 deletions
6
...pi/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreview.java
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,6 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import java.util.List; | ||
|
||
public record AutocraftingPreview(AutocraftingPreviewType type, List<AutocraftingPreviewItem> items) { | ||
} |
6 changes: 6 additions & 0 deletions
6
...rc/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewItem.java
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,6 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
public record AutocraftingPreviewItem(ResourceKey resource, long available, long missing, long toCraft) { | ||
} |
11 changes: 11 additions & 0 deletions
11
...ain/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewProvider.java
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,11 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import java.util.Optional; | ||
|
||
public interface AutocraftingPreviewProvider { | ||
Optional<AutocraftingPreview> getPreview(ResourceKey resource, long amount); | ||
|
||
boolean start(ResourceKey resource, long amount); | ||
} |
2 changes: 1 addition & 1 deletion
2
...ting/preview/AutocraftingPreviewType.java → ...autocrafting/AutocraftingPreviewType.java
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
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
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
18 changes: 0 additions & 18 deletions
18
.../java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreview.java
This file was deleted.
Oops, something went wrong.
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
18 changes: 0 additions & 18 deletions
18
...a/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewItem.java
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
...m/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewListener.java
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
9 changes: 0 additions & 9 deletions
9
...m/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingPreviewProvider.java
This file was deleted.
Oops, something went wrong.
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
1 change: 1 addition & 0 deletions
1
.../java/com/refinedmods/refinedstorage/common/autocrafting/preview/AutocraftingRequest.java
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
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
Oops, something went wrong.