-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #725 from refinedmods/release/2.0.0-milestone.4.10
Release v2.0.0-milestone.4.10
- Loading branch information
Showing
294 changed files
with
8,375 additions
and
1,741 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
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
6 changes: 0 additions & 6 deletions
6
...pi/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreview.java
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...rc/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewItem.java
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
...ain/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewProvider.java
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...rc/main/java/com/refinedmods/refinedstorage/api/autocrafting/AutocraftingPreviewType.java
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...utocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/TaskId.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,9 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import java.util.UUID; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") | ||
public record TaskId(UUID id) { | ||
} |
9 changes: 9 additions & 0 deletions
9
...ng-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/Preview.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,9 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.preview; | ||
|
||
import java.util.List; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") | ||
public record Preview(PreviewType type, List<PreviewItem> items) { | ||
} |
9 changes: 9 additions & 0 deletions
9
...pi/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewItem.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,9 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.preview; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") | ||
public record PreviewItem(ResourceKey resource, long available, long missing, long toCraft) { | ||
} |
14 changes: 14 additions & 0 deletions
14
...rc/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewProvider.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,14 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.preview; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import java.util.Optional; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") | ||
public interface PreviewProvider { | ||
Optional<Preview> getPreview(ResourceKey resource, long amount); | ||
|
||
boolean startTask(ResourceKey resource, long amount); | ||
} |
10 changes: 10 additions & 0 deletions
10
...pi/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/PreviewType.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,10 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.preview; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.9") | ||
public enum PreviewType { | ||
SUCCESS, | ||
MISSING_RESOURCES | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
...i/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/preview/package-info.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,7 @@ | ||
@ParametersAreNonnullByDefault | ||
@FieldsAndMethodsAreNonnullByDefault | ||
package com.refinedmods.refinedstorage.api.autocrafting.preview; | ||
|
||
import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; |
32 changes: 32 additions & 0 deletions
32
...-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatus.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,32 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.status; | ||
|
||
import com.refinedmods.refinedstorage.api.autocrafting.TaskId; | ||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import java.util.List; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") | ||
public record TaskStatus(TaskInfo info, float percentageCompleted, List<Item> items) { | ||
public record TaskInfo(TaskId id, ResourceKey resource, long amount, long startTime) { | ||
} | ||
|
||
public record Item( | ||
ItemType type, | ||
ResourceKey resource, | ||
long stored, | ||
long missing, | ||
long processing, | ||
long scheduled, | ||
long crafting | ||
) { | ||
} | ||
|
||
public enum ItemType { | ||
NORMAL, | ||
MACHINE_DOES_NOT_ACCEPT_RESOURCE, | ||
NO_MACHINE_FOUND, | ||
AUTOCRAFTER_IS_LOCKED | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
.../main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusListener.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,14 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.status; | ||
|
||
import com.refinedmods.refinedstorage.api.autocrafting.TaskId; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") | ||
public interface TaskStatusListener { | ||
void taskStatusChanged(TaskStatus status); | ||
|
||
void taskRemoved(TaskId id); | ||
|
||
void taskAdded(TaskStatus status); | ||
} |
22 changes: 22 additions & 0 deletions
22
.../main/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusProvider.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,22 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.status; | ||
|
||
import com.refinedmods.refinedstorage.api.autocrafting.TaskId; | ||
|
||
import java.util.List; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.10") | ||
public interface TaskStatusProvider { | ||
List<TaskStatus> getStatuses(); | ||
|
||
void addListener(TaskStatusListener listener); | ||
|
||
void removeListener(TaskStatusListener listener); | ||
|
||
void cancel(TaskId taskId); | ||
|
||
void cancelAll(); | ||
|
||
void testUpdate(); | ||
} |
7 changes: 7 additions & 0 deletions
7
...pi/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.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,7 @@ | ||
@ParametersAreNonnullByDefault | ||
@FieldsAndMethodsAreNonnullByDefault | ||
package com.refinedmods.refinedstorage.api.autocrafting.status; | ||
|
||
import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; |
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
35 changes: 35 additions & 0 deletions
35
.../src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/TaskStatusTest.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,35 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting.status; | ||
|
||
import com.refinedmods.refinedstorage.api.autocrafting.ResourceFixtures; | ||
import com.refinedmods.refinedstorage.api.autocrafting.TaskId; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class TaskStatusTest { | ||
@Test | ||
void dummyTest() { | ||
new TaskStatus( | ||
new TaskStatus.TaskInfo( | ||
new TaskId(UUID.randomUUID()), | ||
ResourceFixtures.A, | ||
0, | ||
0 | ||
), | ||
0.69F, | ||
List.of( | ||
new TaskStatus.Item( | ||
TaskStatus.ItemType.NORMAL, | ||
ResourceFixtures.A, | ||
0, | ||
0, | ||
0, | ||
0, | ||
0 | ||
) | ||
) | ||
); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...pi/src/test/java/com/refinedmods/refinedstorage/api/autocrafting/status/package-info.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,7 @@ | ||
@ParametersAreNonnullByDefault | ||
@FieldsAndMethodsAreNonnullByDefault | ||
package com.refinedmods.refinedstorage.api.autocrafting.status; | ||
|
||
import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; | ||
|
||
import javax.annotation.ParametersAreNonnullByDefault; |
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.