Skip to content

Commit

Permalink
Merge pull request #706 from refinedmods/release/2.0.0-milestone.4.8
Browse files Browse the repository at this point in the history
Release v2.0.0-milestone.4.8
  • Loading branch information
raoulvdberge authored Oct 12, 2024
2 parents 902c1e0 + 6080a41 commit dd9d0bd
Show file tree
Hide file tree
Showing 777 changed files with 18,823 additions and 9,373 deletions.
33 changes: 17 additions & 16 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,20 @@ Refined Storage is split up into various modules. Most modules aren't dependent
the `refinedstorage-common`, `refinedstorage-neoforge` and `refinedstorage-fabric` modules have dependencies on
Minecraft.

| Name | Use in addons | Description |
|-------------------------------|---------------|----------------------------------------------------------------------------------------------------------|
| `refinedstorage-core-api` | ✔️ | Contains some utility classes and enums. |
| `refinedstorage-grid-api` | ✔️ | Contains Grid related functionality. |
| `refinedstorage-network-api` | ✔️ | Contains storage network related functionality. |
| `refinedstorage-network` || Contains implementations of `refinedstorage-network-api`. |
| `refinedstorage-network-test` | ✔️ | JUnit extension which helps with setting up a network and a network node for testing. |
| `refinedstorage-query-parser` | ✔️ | A query parser, contains a lexer and parser. Only used for Grid query parsing. |
| `refinedstorage-resource-api` | ✔️ | Contains API for handling resources. |
| `refinedstorage-storage-api` | ✔️ | Contains storage related functionality. |
| `refinedstorage-common-api` | ✔️ | Implements the various Refined Storage API modules for use in Minecraft. |
| `refinedstorage-common` || Common mod code. Most gameplay code is in here. |
| `refinedstorage-fabric-api` | ✔️ | Additional API for the Fabric platform. |
| `refinedstorage-fabric` || The platform module for Fabric. This module contains Fabric specific code. |
| `refinedstorage-neoforge-api` | ✔️ | Additional API for the NeoForge platform. |
| `refinedstorage-neoforge` || The platform module for NeoForge. This module contains NeoForge specific code and the integration tests. |
| Name | Use in addons | Description |
|-----------------------------------|---------------|----------------------------------------------------------------------------------------------------------|
| `refinedstorage-core-api` | ✔️ | Contains some utility classes and enums. |
| `refinedstorage-grid-api` | ✔️ | Contains Grid related functionality. |
| `refinedstorage-autocrafting-api` | ✔️ | Contains autocrafting related functionality. |
| `refinedstorage-network-api` | ✔️ | Contains storage network related functionality. |
| `refinedstorage-network` || Contains implementations of `refinedstorage-network-api`. |
| `refinedstorage-network-test` | ✔️ | JUnit extension which helps with setting up a network and a network node for testing. |
| `refinedstorage-query-parser` | ✔️ | A query parser, contains a lexer and parser. Only used for Grid query parsing. |
| `refinedstorage-resource-api` | ✔️ | Contains API for handling resources. |
| `refinedstorage-storage-api` | ✔️ | Contains storage related functionality. |
| `refinedstorage-common-api` | ✔️ | Implements the various Refined Storage API modules for use in Minecraft. |
| `refinedstorage-common` || Common mod code. Most gameplay code is in here. |
| `refinedstorage-fabric-api` | ✔️ | Additional API for the Fabric platform. |
| `refinedstorage-fabric` || The platform module for Fabric. This module contains Fabric specific code. |
| `refinedstorage-neoforge-api` | ✔️ | Additional API for the NeoForge platform. |
| `refinedstorage-neoforge` || The platform module for NeoForge. This module contains NeoForge specific code and the integration tests. |
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [ opened, synchronize, reopened ]
jobs:
build:
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.19.1
with:
gametests: true
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
type: string
jobs:
draft:
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.19.1
with:
release-type: ${{ inputs.release-type }}
version-number-override: ${{ inputs.version-number-override }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-for-unsupported-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ labeled, unlabeled, reopened ]
jobs:
unsupported-labeler:
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.19.1
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- closed
jobs:
publish-release:
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.19.1
secrets: inherit
with:
project-name: 'Refined Storage'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resolved-issue-locking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
- cron: '0 0 * * 1'
jobs:
lock:
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.19.1
2 changes: 1 addition & 1 deletion .github/workflows/validate-branch-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate branch name
on: [ pull_request ]
jobs:
validate-branch-name:
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.19.1
2 changes: 1 addition & 1 deletion .github/workflows/validate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
jobs:
validate-changelog:
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.19.1
2 changes: 1 addition & 1 deletion .github/workflows/validate-commit-messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate commit messages
on: [ pull_request ]
jobs:
validate-commit-messages:
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.17.1
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.19.1
3 changes: 3 additions & 0 deletions .idea/dictionaries/refinedstorage.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 41 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,44 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [2.0.0-milestone.4.8] - 2024-10-12

### Added

- Autocrafter
- The Relay now has support for propagating autocrafting when not in pass-through mode.

### Changed

- Optimized memory usage and startup time of cable models. After updating, cables will appear disconnected, but this is only visual. Cause a block update to fix this.
- Optimized performance of searching in the Grid.
- Custom titles that overflow will now have a marquee effect instead, for every GUI.
- You can now define a priority in the Crafter.
- You can now change the name of a Crafter in the GUI.
- Changed "Crafter mode" to "Locking mode" with following options:
- Never
- Lock until redstone pulse is received
- Lock until connected machine is empty (new, facilitates easier "blocking mode" without redstone)
- Lock until all outputs are received (new, facilitates easier "blocking mode" without redstone)
- Lock until low redstone signal
- Lock until high redstone signal
- Resources in the Grid that are autocraftable now display an orange backdrop and tooltip to indicate whether the resource is autocraftable at a glance.
- Slots used in the Pattern Grid for pattern encoding and Crafting Grid crafting matrix slots now display an orange backdrop and tooltip to indicate whether the item is autocraftable at a glance. This checks patterns from your network and from your inventory.
- Added help tooltip for filtering based on recipe items in the Crafting Grid.
- The crafting amount and crafting preview screens have been merged. Changing the amount will update the live preview.
- The numbers on the crafting preview screen are now compacted with units.
- When requesting autocrafting multiple resources at once, which can happen via a recipe mod, all the crafting requests are now listed on the side of the GUI.
- You can now request autocrafting from the Storage Monitor if the resource count reaches zero.
- The Crafter has been renamed to "Autocrafter".

### Fixed

- Fixed mouse keybindings not working on NeoForge.
- Fixed upgrade destinations not being shown on upgrades.
- Fixed resources with changed data format or ID causing entire storage to fail to load.
- Fixed crash when trying to export fluids from an External Storage on Fabric.
- The Configuration Card can now also transfer the (configured) Regulator Upgrade.

## [2.0.0-milestone.4.7] - 2024-08-11

### Added
Expand Down Expand Up @@ -737,7 +775,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- The Grid can now use smooth scrolling.
- The Grid now has syntax highlighting for the search query.

[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.7...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.8...HEAD

[2.0.0-milestone.4.8]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.7...v2.0.0-milestone.4.8

[2.0.0-milestone.4.7]: https://github.com/refinedmods/refinedstorage2/compare/v2.0.0-milestone.4.6...v2.0.0-milestone.4.7

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ this mod that allow the player to set up auto-crafting, allowing the crafting of
- [Javadoc](https://refinedmods.com/javadoc/refinedstorage2)
- [Discord](https://discordapp.com/invite/VYzsydb)
- [Twitter](https://twitter.com/refinedmods)
- [Mastodon](https://anvil.social/@refinedmods)

## Building

Expand Down
9 changes: 9 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ project.extensions.getByType<SonarExtension>().apply {
)
}
}

allprojects {
apply(plugin = "publishing")
publishing {
repositories {
mavenLocal()
}
}
}
6 changes: 4 additions & 2 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="FileLength">
<property name="max" value="750"/>
<property name="max" value="800"/>
</module>
<module name="NewlineAtEndOfFile"/>
<module name="JavadocPackage"/>
Expand Down Expand Up @@ -109,7 +109,9 @@
<module name="MethodCount"/>
<module name="MethodLength"/>
<module name="OuterTypeNumber"/>
<module name="RecordComponentNumber"/>
<module name="RecordComponentNumber">
<property name="max" value="20"/>
</module>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="NoWhitespaceAfter"/>
Expand Down
6 changes: 5 additions & 1 deletion gradle.properties
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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
31 changes: 31 additions & 0 deletions refinedstorage-autocrafting-api/build.gradle.kts
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)
}
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) {
}
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) {
}
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);
}
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
}

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();
}
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();
}
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;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.network.test.fake;
package com.refinedmods.refinedstorage.api.autocrafting;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

Expand Down
Loading

0 comments on commit dd9d0bd

Please sign in to comment.