-
-
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.
Merge pull request #706 from refinedmods/release/2.0.0-milestone.4.8
Release v2.0.0-milestone.4.8
- Loading branch information
Showing
777 changed files
with
18,823 additions
and
9,373 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
refinedarchitectVersion=0.17.1 | ||
refinedarchitectVersion=0.19.1 | ||
# Gradle | ||
org.gradle.jvmargs=-Xmx1G | ||
org.gradle.configureondemand=true | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=true | ||
org.gradle.configuration-cache.problems=warn |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
plugins { | ||
id("refinedarchitect.base") | ||
} | ||
|
||
refinedarchitect { | ||
testing() | ||
mutationTesting() | ||
javadoc() | ||
publishing { | ||
maven = true | ||
} | ||
} | ||
|
||
base { | ||
archivesName.set("refinedstorage-autocrafting-api") | ||
} | ||
|
||
dependencies { | ||
api(libs.apiguardian) | ||
api(project(":refinedstorage-resource-api")) | ||
api(project(":refinedstorage-core-api")) | ||
api(project(":refinedstorage-storage-api")) | ||
api(project(":refinedstorage-query-parser")) | ||
implementation(libs.slf4j.api) | ||
testImplementation(libs.junit.api) | ||
testImplementation(libs.junit.params) | ||
testImplementation(libs.assertj) | ||
testImplementation(libs.mockito) | ||
testRuntimeOnly(libs.junit.engine) | ||
testRuntimeOnly(libs.slf4j.impl) | ||
} |
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 startTask(ResourceKey resource, long amount); | ||
} |
7 changes: 7 additions & 0 deletions
7
...rc/main/java/com/refinedmods/refinedstorage/api/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
public enum AutocraftingPreviewType { | ||
SUCCESS, | ||
MISSING_RESOURCES | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
...tocrafting-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/Pattern.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,12 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import java.util.Set; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.6") | ||
public interface Pattern { | ||
Set<ResourceKey> getOutputResources(); | ||
} |
18 changes: 18 additions & 0 deletions
18
...-api/src/main/java/com/refinedmods/refinedstorage/api/autocrafting/PatternRepository.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,18 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import java.util.Set; | ||
|
||
import org.apiguardian.api.API; | ||
|
||
@API(status = API.Status.STABLE, since = "2.0.0-milestone.4.8") | ||
public interface PatternRepository { | ||
void add(Pattern pattern); | ||
|
||
void remove(Pattern pattern); | ||
|
||
Set<ResourceKey> getOutputs(); | ||
|
||
Set<Pattern> getAll(); | ||
} |
41 changes: 41 additions & 0 deletions
41
.../src/main/java/com/refinedmods/refinedstorage/api/autocrafting/PatternRepositoryImpl.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,41 @@ | ||
package com.refinedmods.refinedstorage.api.autocrafting; | ||
|
||
import com.refinedmods.refinedstorage.api.resource.ResourceKey; | ||
|
||
import java.util.Collections; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
public class PatternRepositoryImpl implements PatternRepository { | ||
private final Set<Pattern> patterns = new HashSet<>(); | ||
private final Set<Pattern> patternsView = Collections.unmodifiableSet(patterns); | ||
private final Set<ResourceKey> outputs = new HashSet<>(); | ||
|
||
@Override | ||
public void add(final Pattern pattern) { | ||
patterns.add(pattern); | ||
outputs.addAll(pattern.getOutputResources()); | ||
} | ||
|
||
@Override | ||
public void remove(final Pattern pattern) { | ||
patterns.remove(pattern); | ||
for (final ResourceKey output : pattern.getOutputResources()) { | ||
final boolean noOtherPatternHasThisOutput = patterns.stream() | ||
.noneMatch(otherPattern -> otherPattern.getOutputResources().contains(output)); | ||
if (noOtherPatternHasThisOutput) { | ||
outputs.remove(output); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public Set<ResourceKey> getOutputs() { | ||
return outputs; | ||
} | ||
|
||
@Override | ||
public Set<Pattern> getAll() { | ||
return patternsView; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...orage/network/test/fake/package-info.java → ...torage/api/autocrafting/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
Oops, something went wrong.