From 8d669549c22e08b1b65f4e61b77e31cd5801af43 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Thu, 11 Jul 2024 09:58:02 +0200 Subject: [PATCH 1/6] docs: add crowdin badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87ee6ef..a9f7768 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Refined Storage - REI Integration [![Build Status](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md) +# Refined Storage - REI Integration [![Build Status](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Crowdin](https://badges.crowdin.net/refined-storage-rei-integration/localized.svg)](https://crowdin.com/project/refined-storage-rei-integration) [![Discord](https://img.shields.io/discord/342942776494653441)](https://discordapp.com/invite/VYzsydb) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md) ## About From b497400f99abe5fbc9a4c698a4c3b7feec923f4c Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 14 Jul 2024 00:17:01 +0200 Subject: [PATCH 2/6] refactor: stop using getcurrentresource --- .../rei/fabric/GridFocusedStackProvider.java | 11 ++++++++++- .../rei/forge/GridFocusedStackProvider.java | 13 +++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java index 09dd951..28b5f91 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.rei.fabric; import com.refinedmods.refinedstorage.platform.api.PlatformApi; +import com.refinedmods.refinedstorage.platform.api.grid.view.PlatformGridResource; import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.platform.common.grid.screen.AbstractGridScreen; @@ -16,10 +17,18 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (!(screen instanceof AbstractGridScreen gridScreen)) { return CompoundEventResult.pass(); } - final PlatformResourceKey resource = gridScreen.getCurrentResource(); + final PlatformGridResource resource = gridScreen.getCurrentGridResource(); if (resource == null) { return CompoundEventResult.pass(); } + final PlatformResourceKey underlyingResource = resource.getUnderlyingResource(); + if (underlyingResource == null) { + return CompoundEventResult.pass(); + } + return provide(underlyingResource); + } + + private CompoundEventResult> provide(final PlatformResourceKey resource) { final Object converted = PlatformApi.INSTANCE.getIngredientConverter() .convertToIngredient(resource) .orElse(null); diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java index 985963c..ee178f0 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.rei.forge; import com.refinedmods.refinedstorage.platform.api.PlatformApi; +import com.refinedmods.refinedstorage.platform.api.grid.view.PlatformGridResource; import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; import com.refinedmods.refinedstorage.platform.common.grid.screen.AbstractGridScreen; @@ -16,12 +17,20 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (!(screen instanceof AbstractGridScreen gridScreen)) { return CompoundEventResult.pass(); } - final PlatformResourceKey underlyingResource = gridScreen.getCurrentResource(); + final PlatformGridResource resource = gridScreen.getCurrentGridResource(); + if (resource == null) { + return CompoundEventResult.pass(); + } + final PlatformResourceKey underlyingResource = resource.getUnderlyingResource(); if (underlyingResource == null) { return CompoundEventResult.pass(); } + return provide(underlyingResource); + } + + private CompoundEventResult> provide(final PlatformResourceKey resource) { final Object converted = PlatformApi.INSTANCE.getIngredientConverter() - .convertToIngredient(underlyingResource) + .convertToIngredient(resource) .orElse(null); if (converted instanceof EntryStack stack) { return CompoundEventResult.interruptTrue(stack); From 37ec85bbd2c1674cc1da48bb48bfc6dc4262192e Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sun, 14 Jul 2024 00:54:23 +0200 Subject: [PATCH 3/6] fix: add missing annotation --- .../refinedmods/refinedstorage/rei/fabric/package-info.java | 3 +++ .../com/refinedmods/refinedstorage/rei/forge/package-info.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/package-info.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/package-info.java index 1f527dc..0115d2a 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/package-info.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/package-info.java @@ -1,4 +1,7 @@ @ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault package com.refinedmods.refinedstorage.rei.fabric; +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/package-info.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/package-info.java index 1e55e43..c292b0d 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/package-info.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/package-info.java @@ -1,4 +1,7 @@ @ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault package com.refinedmods.refinedstorage.rei.forge; +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + import javax.annotation.ParametersAreNonnullByDefault; From 2a32a79b88929bb90801cc83ef71ac7eaad5d4a3 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Sat, 20 Jul 2024 20:24:20 +0200 Subject: [PATCH 4/6] chore: upgrade refined architect Mdg is on the gradle plugin portal. --- .github/CONTRIBUTING.md | 6 ++++-- .github/workflows/build.yml | 2 +- .github/workflows/draft-release.yml | 2 +- .../workflows/issue-for-unsupported-version.yml | 2 +- .github/workflows/publish-release.yml | 2 +- .github/workflows/resolved-issue-locking.yml | 2 +- .github/workflows/validate-branch-name.yml | 2 +- .github/workflows/validate-changelog.yml | 2 +- .github/workflows/validate-commit-messages.yml | 2 +- gradle.properties | 1 + settings.gradle.kts | 15 ++++++--------- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5159baf..6737851 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,7 +9,8 @@ or any other method with the owners of this repository before making a change. These are the most important things to know before contributing (also explained in more detail later in this document): - Commit messages must adhere to [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/). -- Branch names must be formatted correctly. The format is `{category}/GH-{issue number}/{lowercase-description}`. +- Branch names must be formatted correctly. The format is `{category}/GH-{issue number}/{lowercase-description}`. You + can also use `NO-ISSUE` instead of a GitHub issue number. Category must match a category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum). - We use [Checkstyle](https://checkstyle.sourceforge.io/) in our build workflow to validate coding style. It is @@ -47,7 +48,8 @@ Because we use merge commits when merging a PR, branch names will be part of the branch names must follow a certain standard. The format is `{category}/GH-{issue number}/{lowercase-description}` and a branch name can be maximum 50 characters of -length. +length. You +can also use `NO-ISSUE` instead of a GitHub issue number. Category must match a category [used in our Commitlint config](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional#type-enum). diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a157d3d..869dafc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: types: [ opened, synchronize, reopened ] jobs: build: - uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.4 + uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.7 with: mutation-testing: false secrets: inherit diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 2300f88..31fd136 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -17,7 +17,7 @@ on: type: string jobs: draft: - uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.4 + uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.7 with: release-type: ${{ inputs.release-type }} version-number-override: ${{ inputs.version-number-override }} diff --git a/.github/workflows/issue-for-unsupported-version.yml b/.github/workflows/issue-for-unsupported-version.yml index 7444dec..59ca50f 100644 --- a/.github/workflows/issue-for-unsupported-version.yml +++ b/.github/workflows/issue-for-unsupported-version.yml @@ -4,4 +4,4 @@ on: types: [ labeled, unlabeled, reopened ] jobs: unsupported-labeler: - uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.7 \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 4bd2e33..1de567c 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,7 +7,7 @@ on: - closed jobs: publish-release: - uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.4 + uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.7 secrets: inherit with: project-name: 'Refined Storage - REI Integration' diff --git a/.github/workflows/resolved-issue-locking.yml b/.github/workflows/resolved-issue-locking.yml index ee10c5c..85e717b 100644 --- a/.github/workflows/resolved-issue-locking.yml +++ b/.github/workflows/resolved-issue-locking.yml @@ -4,4 +4,4 @@ on: - cron: '0 0 * * *' jobs: lock: - uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.7 \ No newline at end of file diff --git a/.github/workflows/validate-branch-name.yml b/.github/workflows/validate-branch-name.yml index 1614152..b13799f 100644 --- a/.github/workflows/validate-branch-name.yml +++ b/.github/workflows/validate-branch-name.yml @@ -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.16.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.16.7 \ No newline at end of file diff --git a/.github/workflows/validate-changelog.yml b/.github/workflows/validate-changelog.yml index d2a2d80..47db6c5 100644 --- a/.github/workflows/validate-changelog.yml +++ b/.github/workflows/validate-changelog.yml @@ -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.16.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.16.7 \ No newline at end of file diff --git a/.github/workflows/validate-commit-messages.yml b/.github/workflows/validate-commit-messages.yml index 449efa5..ea9f66e 100644 --- a/.github/workflows/validate-commit-messages.yml +++ b/.github/workflows/validate-commit-messages.yml @@ -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.16.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.7 \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index bb0970a..febdaa3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ +refinedarchitectVersion=0.16.7 refinedstorageVersion=2.0.0-milestone.4.4 # https://linkie.shedaniel.dev/dependencies?loader=neoforge&version=1.21 # https://linkie.shedaniel.dev/dependencies?loader=fabric&version=1.21 diff --git a/settings.gradle.kts b/settings.gradle.kts index 214ebe4..10ba392 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -13,17 +13,14 @@ pluginManagement { name = "Fabric" url = uri("https://maven.fabricmc.net/") } - maven { - name = "NeoForge" - url = uri("https://maven.neoforged.net/releases") - } } plugins { - id("refinedarchitect.root").version("0.16.4") - id("refinedarchitect.base").version("0.16.4") - id("refinedarchitect.common").version("0.16.4") - id("refinedarchitect.neoforge").version("0.16.4") - id("refinedarchitect.fabric").version("0.16.4") + val refinedarchitectVersion: String by settings + id("refinedarchitect.root").version(refinedarchitectVersion) + id("refinedarchitect.base").version(refinedarchitectVersion) + id("refinedarchitect.common").version(refinedarchitectVersion) + id("refinedarchitect.neoforge").version(refinedarchitectVersion) + id("refinedarchitect.fabric").version(refinedarchitectVersion) } } From 4468223605cb13121d8b4e3e900d1d9a8de56718 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 26 Jul 2024 20:54:09 +0200 Subject: [PATCH 5/6] chore: upgrade refined storage --- .github/workflows/build.yml | 2 +- .github/workflows/draft-release.yml | 2 +- .../workflows/issue-for-unsupported-version.yml | 2 +- .github/workflows/publish-release.yml | 2 +- .github/workflows/resolved-issue-locking.yml | 2 +- .github/workflows/validate-branch-name.yml | 2 +- .github/workflows/validate-changelog.yml | 2 +- .github/workflows/validate-commit-messages.yml | 2 +- CHANGELOG.md | 4 ++++ gradle.properties | 4 ++-- .../build.gradle.kts | 1 - .../build.gradle.kts | 2 +- .../rei/fabric/CraftingGridTransferHandler.java | 4 ++-- .../rei/fabric/DraggableStackVisitorImpl.java | 16 ++++++++-------- .../rei/fabric/ExclusionZonesProviderImpl.java | 2 +- .../rei/fabric/GridFocusedStackProvider.java | 10 +++++----- .../rei/fabric/ReiClientPlugin.java | 12 ++++++------ .../rei/fabric/ReiGridSynchronizer.java | 2 +- .../fabric/ReiRecipeModIngredientConverter.java | 8 ++++---- .../rei/fabric/ReiRefinedStoragePlugin.java | 12 ++++++------ .../rei/fabric/ResourceFocusedStackProvider.java | 8 ++++---- .../src/main/resources/fabric.mod.json | 2 +- .../build.gradle.kts | 2 +- .../rei/forge/CraftingGridTransferHandler.java | 4 ++-- .../rei/forge/DraggableStackVisitorImpl.java | 16 ++++++++-------- .../rei/forge/ExclusionZonesProviderImpl.java | 2 +- .../rei/forge/GridFocusedStackProvider.java | 10 +++++----- .../refinedstorage/rei/forge/ModInitializer.java | 11 +++++++---- .../rei/forge/ReiClientPlugin.java | 12 ++++++------ .../rei/forge/ReiGridSynchronizer.java | 2 +- .../forge/ReiRecipeModIngredientConverter.java | 8 ++++---- .../rei/forge/ResourceFocusedStackProvider.java | 8 ++++---- .../main/resources/META-INF/neoforge.mods.toml | 2 +- 33 files changed, 93 insertions(+), 87 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 869dafc..9875be5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: types: [ opened, synchronize, reopened ] jobs: build: - uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.7 + uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.9 with: mutation-testing: false secrets: inherit diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 31fd136..d1b6a91 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -17,7 +17,7 @@ on: type: string jobs: draft: - uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.7 + uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.9 with: release-type: ${{ inputs.release-type }} version-number-override: ${{ inputs.version-number-override }} diff --git a/.github/workflows/issue-for-unsupported-version.yml b/.github/workflows/issue-for-unsupported-version.yml index 59ca50f..054bce1 100644 --- a/.github/workflows/issue-for-unsupported-version.yml +++ b/.github/workflows/issue-for-unsupported-version.yml @@ -4,4 +4,4 @@ on: types: [ labeled, unlabeled, reopened ] jobs: unsupported-labeler: - uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.7 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.9 \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 1de567c..0f39d09 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,7 +7,7 @@ on: - closed jobs: publish-release: - uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.7 + uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.9 secrets: inherit with: project-name: 'Refined Storage - REI Integration' diff --git a/.github/workflows/resolved-issue-locking.yml b/.github/workflows/resolved-issue-locking.yml index 85e717b..627e0f5 100644 --- a/.github/workflows/resolved-issue-locking.yml +++ b/.github/workflows/resolved-issue-locking.yml @@ -4,4 +4,4 @@ on: - cron: '0 0 * * *' jobs: lock: - uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.7 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.9 \ No newline at end of file diff --git a/.github/workflows/validate-branch-name.yml b/.github/workflows/validate-branch-name.yml index b13799f..944aa08 100644 --- a/.github/workflows/validate-branch-name.yml +++ b/.github/workflows/validate-branch-name.yml @@ -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.16.7 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.16.9 \ No newline at end of file diff --git a/.github/workflows/validate-changelog.yml b/.github/workflows/validate-changelog.yml index 47db6c5..218f86e 100644 --- a/.github/workflows/validate-changelog.yml +++ b/.github/workflows/validate-changelog.yml @@ -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.16.7 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.16.9 \ No newline at end of file diff --git a/.github/workflows/validate-commit-messages.yml b/.github/workflows/validate-commit-messages.yml index ea9f66e..b70a80d 100644 --- a/.github/workflows/validate-commit-messages.yml +++ b/.github/workflows/validate-commit-messages.yml @@ -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.16.7 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.9 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ff21a3a..b22162f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed + +- Support for Refined Storage v2.0.0-milestone.4.5. + ## [0.2.1] - 2024-07-10 ## [0.2.0] - 2024-07-06 diff --git a/gradle.properties b/gradle.properties index febdaa3..237b909 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ -refinedarchitectVersion=0.16.7 -refinedstorageVersion=2.0.0-milestone.4.4 +refinedarchitectVersion=0.16.9 +refinedstorageVersion=2.0.0-milestone.4.5 # https://linkie.shedaniel.dev/dependencies?loader=neoforge&version=1.21 # https://linkie.shedaniel.dev/dependencies?loader=fabric&version=1.21 architecturyVersion=13.0.3 diff --git a/refinedstorage-rei-integration-common/build.gradle.kts b/refinedstorage-rei-integration-common/build.gradle.kts index fc29011..7cab2db 100644 --- a/refinedstorage-rei-integration-common/build.gradle.kts +++ b/refinedstorage-rei-integration-common/build.gradle.kts @@ -12,4 +12,3 @@ refinedarchitect { base { archivesName.set("refinedstorage-rei-integration-common") } - diff --git a/refinedstorage-rei-integration-fabric/build.gradle.kts b/refinedstorage-rei-integration-fabric/build.gradle.kts index b27e11e..f7210c6 100644 --- a/refinedstorage-rei-integration-fabric/build.gradle.kts +++ b/refinedstorage-rei-integration-fabric/build.gradle.kts @@ -39,7 +39,7 @@ val clothConfigVersion: String by project val reiVersion: String by project dependencies { - modApi("com.refinedmods.refinedstorage:refinedstorage-platform-fabric:${refinedstorageVersion}") + modApi("com.refinedmods.refinedstorage:refinedstorage-fabric:${refinedstorageVersion}") modApi("dev.architectury:architectury-fabric:${architecturyVersion}") modApi("me.shedaniel.cloth:cloth-config-fabric:${clothConfigVersion}") modApi("me.shedaniel:RoughlyEnoughItems-fabric:${reiVersion}") diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/CraftingGridTransferHandler.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/CraftingGridTransferHandler.java index 352c1c0..7671db3 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/CraftingGridTransferHandler.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/CraftingGridTransferHandler.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.rei.fabric; import com.refinedmods.refinedstorage.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage.platform.common.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage.platform.common.support.resource.ItemResource; +import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.awt.Color; import java.util.List; diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/DraggableStackVisitorImpl.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/DraggableStackVisitorImpl.java index 8c0af22..3a7affd 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/DraggableStackVisitorImpl.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/DraggableStackVisitorImpl.java @@ -1,11 +1,11 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; -import com.refinedmods.refinedstorage.platform.common.support.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage.platform.common.support.containermenu.ResourceSlot; -import com.refinedmods.refinedstorage.platform.common.support.packet.c2s.C2SPackets; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; import java.util.ArrayList; import java.util.List; @@ -29,7 +29,7 @@ public Stream getDraggableAcceptingBounds( final var menu = screen.getMenu(); final var value = stack.getStack().getValue(); final List bounds = new ArrayList<>(); - PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value).ifPresent(resource -> { + RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(value).ifPresent(resource -> { for (final ResourceSlot slot : menu.getResourceSlots()) { if (slot.isFilter() && slot.isValid(resource)) { bounds.add(BoundsProvider.ofRectangle(toRectangle(screen, slot))); @@ -47,7 +47,7 @@ public DraggedAcceptorResult acceptDraggedStack( final var screen = context.getScreen(); final var menu = screen.getMenu(); final Object value = stack.getStack().getValue(); - return PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value) + return RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(value) .map(resource -> accept(context, menu, screen, resource)) .orElse(DraggedAcceptorResult.PASS); } diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ExclusionZonesProviderImpl.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ExclusionZonesProviderImpl.java index 73b222b..1fd9075 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ExclusionZonesProviderImpl.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ExclusionZonesProviderImpl.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import java.util.Collection; import java.util.stream.Collectors; diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java index 28b5f91..7c99d3b 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.grid.view.PlatformGridResource; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.common.grid.screen.AbstractGridScreen; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.grid.view.PlatformGridResource; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.grid.screen.AbstractGridScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -29,7 +29,7 @@ public CompoundEventResult> provide(final Screen screen, final Poi } private CompoundEventResult> provide(final PlatformResourceKey resource) { - final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + final Object converted = RefinedStorageApi.INSTANCE.getIngredientConverter() .convertToIngredient(resource) .orElse(null); if (converted instanceof EntryStack stack) { diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiClientPlugin.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiClientPlugin.java index 49eb288..a5809e0 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiClientPlugin.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiClientPlugin.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.common.content.ContentIds; -import com.refinedmods.refinedstorage.platform.common.content.Items; -import com.refinedmods.refinedstorage.platform.common.content.Tags; -import com.refinedmods.refinedstorage.platform.common.controller.ControllerBlockItem; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.content.ContentIds; +import com.refinedmods.refinedstorage.common.content.Items; +import com.refinedmods.refinedstorage.common.content.Tags; +import com.refinedmods.refinedstorage.common.controller.ControllerBlockItem; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import java.util.function.Supplier; @@ -23,7 +23,7 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; -import static com.refinedmods.refinedstorage.platform.common.util.IdentifierUtil.createTranslation; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; import static com.refinedmods.refinedstorage.rei.common.Common.FULLY_CHARGED_CONTROLLER_GROUP_ID; import static com.refinedmods.refinedstorage.rei.common.Common.FULLY_CHARGED_CONTROLLER_GROUP_NAME; diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiGridSynchronizer.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiGridSynchronizer.java index 5d8f1ef..2336085 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiGridSynchronizer.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiGridSynchronizer.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.common.grid.AbstractGridSynchronizer; +import com.refinedmods.refinedstorage.common.grid.AbstractGridSynchronizer; import javax.annotation.Nullable; diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRecipeModIngredientConverter.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRecipeModIngredientConverter.java index 884b2c5..074b036 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRecipeModIngredientConverter.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRecipeModIngredientConverter.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.api.support.resource.RecipeModIngredientConverter; -import com.refinedmods.refinedstorage.platform.common.support.resource.FluidResource; -import com.refinedmods.refinedstorage.platform.common.support.resource.ItemResource; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.api.support.resource.RecipeModIngredientConverter; +import com.refinedmods.refinedstorage.common.support.resource.FluidResource; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.Optional; diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRefinedStoragePlugin.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRefinedStoragePlugin.java index bc9031d..34bdf8c 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRefinedStoragePlugin.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRefinedStoragePlugin.java @@ -1,16 +1,16 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.RefinedStoragePlugin; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.fabric.api.RefinedStoragePlugin; import static com.refinedmods.refinedstorage.rei.common.Common.SYNCHRONIZER_ID; import static com.refinedmods.refinedstorage.rei.common.Common.TWO_WAY_SYNCHRONIZER_ID; public class ReiRefinedStoragePlugin implements RefinedStoragePlugin { @Override - public void onPlatformApiAvailable(final PlatformApi platformApi) { - platformApi.addIngredientConverter(new ReiRecipeModIngredientConverter()); - platformApi.getGridSynchronizerRegistry().register(SYNCHRONIZER_ID, new ReiGridSynchronizer(false)); - platformApi.getGridSynchronizerRegistry().register(TWO_WAY_SYNCHRONIZER_ID, new ReiGridSynchronizer(true)); + public void onApiAvailable(final RefinedStorageApi api) { + api.addIngredientConverter(new ReiRecipeModIngredientConverter()); + api.getGridSynchronizerRegistry().register(SYNCHRONIZER_ID, new ReiGridSynchronizer(false)); + api.getGridSynchronizerRegistry().register(TWO_WAY_SYNCHRONIZER_ID, new ReiGridSynchronizer(true)); } } diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ResourceFocusedStackProvider.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ResourceFocusedStackProvider.java index d4a14ba..c573ae6 100644 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ResourceFocusedStackProvider.java +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ResourceFocusedStackProvider.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.rei.fabric; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -20,7 +20,7 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (hoveredResource == null) { return CompoundEventResult.pass(); } - final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + final Object converted = RefinedStorageApi.INSTANCE.getIngredientConverter() .convertToIngredient(hoveredResource) .orElse(null); if (converted instanceof EntryStack stack) { diff --git a/refinedstorage-rei-integration-fabric/src/main/resources/fabric.mod.json b/refinedstorage-rei-integration-fabric/src/main/resources/fabric.mod.json index 74c6d92..4a0a4b3 100644 --- a/refinedstorage-rei-integration-fabric/src/main/resources/fabric.mod.json +++ b/refinedstorage-rei-integration-fabric/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ "fabricloader": ">=0.14.6", "fabric-api": "*", "minecraft": "~1.21", - "refinedstorage": ">=2.0.0-milestone.4.2", + "refinedstorage": ">=2.0.0-milestone.4.5", "roughlyenoughitems": ">=16", "java": ">=17" } diff --git a/refinedstorage-rei-integration-neoforge/build.gradle.kts b/refinedstorage-rei-integration-neoforge/build.gradle.kts index c0b371d..166a557 100644 --- a/refinedstorage-rei-integration-neoforge/build.gradle.kts +++ b/refinedstorage-rei-integration-neoforge/build.gradle.kts @@ -39,7 +39,7 @@ val clothConfigVersion: String by project val reiVersion: String by project dependencies { - api("com.refinedmods.refinedstorage:refinedstorage-platform-neoforge:${refinedstorageVersion}") + api("com.refinedmods.refinedstorage:refinedstorage-neoforge:${refinedstorageVersion}") api("dev.architectury:architectury-neoforge:${architecturyVersion}") api("me.shedaniel.cloth:cloth-config-neoforge:${clothConfigVersion}") api("me.shedaniel:RoughlyEnoughItems-neoforge:${reiVersion}") diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/CraftingGridTransferHandler.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/CraftingGridTransferHandler.java index d73ceec..f32f35c 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/CraftingGridTransferHandler.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/CraftingGridTransferHandler.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.rei.forge; import com.refinedmods.refinedstorage.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage.platform.common.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage.platform.common.support.resource.ItemResource; +import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.awt.Color; import java.util.List; diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java index 81d9bdc..5375f9b 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java @@ -1,11 +1,11 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; -import com.refinedmods.refinedstorage.platform.common.support.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage.platform.common.support.containermenu.ResourceSlot; -import com.refinedmods.refinedstorage.platform.common.support.packet.c2s.C2SPackets; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.containermenu.AbstractResourceContainerMenu; +import com.refinedmods.refinedstorage.common.support.containermenu.ResourceSlot; +import com.refinedmods.refinedstorage.common.support.packet.c2s.C2SPackets; import java.util.ArrayList; import java.util.List; @@ -29,7 +29,7 @@ public Stream getDraggableAcceptingBounds( final var menu = screen.getMenu(); final var value = stack.getStack().getValue(); final List bounds = new ArrayList<>(); - PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value).ifPresent(resource -> { + RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(value).ifPresent(resource -> { for (final ResourceSlot slot : menu.getResourceSlots()) { if (slot.isFilter() && slot.isValid(resource)) { bounds.add(BoundsProvider.ofRectangle(toRectangle(screen, slot))); @@ -47,7 +47,7 @@ public DraggedAcceptorResult acceptDraggedStack( final var screen = context.getScreen(); final var menu = screen.getMenu(); final Object value = stack.getStack().getValue(); - return PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value) + return RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(value) .map(resource -> accept(context, menu, screen, resource)) .orElse(DraggedAcceptorResult.PASS); } diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ExclusionZonesProviderImpl.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ExclusionZonesProviderImpl.java index cd187f2..0e8a726 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ExclusionZonesProviderImpl.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ExclusionZonesProviderImpl.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import java.util.Collection; import java.util.stream.Collectors; diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java index ee178f0..c5cbc2c 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.grid.view.PlatformGridResource; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.common.grid.screen.AbstractGridScreen; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.grid.view.PlatformGridResource; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.grid.screen.AbstractGridScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -29,7 +29,7 @@ public CompoundEventResult> provide(final Screen screen, final Poi } private CompoundEventResult> provide(final PlatformResourceKey resource) { - final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + final Object converted = RefinedStorageApi.INSTANCE.getIngredientConverter() .convertToIngredient(resource) .orElse(null); if (converted instanceof EntryStack stack) { diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ModInitializer.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ModInitializer.java index b3c9df9..9d2dba9 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ModInitializer.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ModInitializer.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.rei.common.Common; import net.neoforged.api.distmarker.Dist; @@ -23,9 +23,12 @@ public ModInitializer(final IEventBus eventBus) { @SubscribeEvent public static void onClientSetup(final FMLClientSetupEvent e) { - PlatformApi.INSTANCE.addIngredientConverter(new ReiRecipeModIngredientConverter()); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register(SYNCHRONIZER_ID, new ReiGridSynchronizer(false)); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( + RefinedStorageApi.INSTANCE.addIngredientConverter(new ReiRecipeModIngredientConverter()); + RefinedStorageApi.INSTANCE.getGridSynchronizerRegistry().register( + SYNCHRONIZER_ID, + new ReiGridSynchronizer(false) + ); + RefinedStorageApi.INSTANCE.getGridSynchronizerRegistry().register( TWO_WAY_SYNCHRONIZER_ID, new ReiGridSynchronizer(true) ); diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java index 51ac864..0a7a760 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java @@ -1,10 +1,10 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.common.content.ContentIds; -import com.refinedmods.refinedstorage.platform.common.content.Items; -import com.refinedmods.refinedstorage.platform.common.content.Tags; -import com.refinedmods.refinedstorage.platform.common.controller.ControllerBlockItem; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.content.ContentIds; +import com.refinedmods.refinedstorage.common.content.Items; +import com.refinedmods.refinedstorage.common.content.Tags; +import com.refinedmods.refinedstorage.common.controller.ControllerBlockItem; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import java.util.function.Supplier; @@ -22,7 +22,7 @@ import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; -import static com.refinedmods.refinedstorage.platform.common.util.IdentifierUtil.createTranslation; +import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation; import static com.refinedmods.refinedstorage.rei.common.Common.FULLY_CHARGED_CONTROLLER_GROUP_ID; import static com.refinedmods.refinedstorage.rei.common.Common.FULLY_CHARGED_CONTROLLER_GROUP_NAME; diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiGridSynchronizer.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiGridSynchronizer.java index ce56a03..3786fd0 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiGridSynchronizer.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiGridSynchronizer.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.common.grid.AbstractGridSynchronizer; +import com.refinedmods.refinedstorage.common.grid.AbstractGridSynchronizer; import javax.annotation.Nullable; diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiRecipeModIngredientConverter.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiRecipeModIngredientConverter.java index f2f21e6..6f36a29 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiRecipeModIngredientConverter.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiRecipeModIngredientConverter.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.api.support.resource.RecipeModIngredientConverter; -import com.refinedmods.refinedstorage.platform.common.support.resource.FluidResource; -import com.refinedmods.refinedstorage.platform.common.support.resource.ItemResource; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.api.support.resource.RecipeModIngredientConverter; +import com.refinedmods.refinedstorage.common.support.resource.FluidResource; +import com.refinedmods.refinedstorage.common.support.resource.ItemResource; import java.util.Optional; diff --git a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java index 3535aee..1a84e9c 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java +++ b/refinedstorage-rei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.rei.forge; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; +import com.refinedmods.refinedstorage.common.api.support.resource.PlatformResourceKey; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -20,7 +20,7 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (hoveredResource == null) { return CompoundEventResult.pass(); } - final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + final Object converted = RefinedStorageApi.INSTANCE.getIngredientConverter() .convertToIngredient(hoveredResource) .orElse(null); if (converted instanceof EntryStack stack) { diff --git a/refinedstorage-rei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml b/refinedstorage-rei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml index 13d8137..e7bd978 100644 --- a/refinedstorage-rei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/refinedstorage-rei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -14,7 +14,7 @@ REI integration for Refined Storage. [[dependencies.refinedstorage_rei_integration]] modId = "refinedstorage" type = "required" -versionRange = "2.0.0-milestone.4.2" +versionRange = "2.0.0-milestone.4.5" side = "BOTH" [[dependencies.refinedstorage_rei_integration]] modId = "roughlyenoughitems" From 8e4d06d6025d91cd7ee4450bc6d0034ac3071708 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Fri, 26 Jul 2024 18:54:51 +0000 Subject: [PATCH 6/6] chore: prepare release v0.2.2 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b22162f..4f3a0bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.2.2] - 2024-07-26 + ### Fixed - Support for Refined Storage v2.0.0-milestone.4.5. @@ -54,7 +56,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Support for REI collapsable entries. - Grid / REI search box synchronization options. -[Unreleased]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.1...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.2...HEAD + +[0.2.2]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.1...v0.2.2 [0.2.1]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.0...v0.2.1