diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d48d52e..1826520 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..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.4 + 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 2300f88..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.4 + 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 7444dec..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.4 \ 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 de9ec24..28c3797 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.9 secrets: inherit with: project-name: 'Refined Storage - EMI Integration' diff --git a/.github/workflows/resolved-issue-locking.yml b/.github/workflows/resolved-issue-locking.yml index ee10c5c..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.4 \ 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 1614152..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.4 \ 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 d2a2d80..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.4 \ 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 449efa5..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.4 \ 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 b705c13..5a84262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.3.2] - 2024-07-26 + +### Fixed + +- Support for Refined Storage v2.0.0-milestone.4.5. + ## [0.3.1] - 2024-07-10 ## [0.3.0] - 2024-07-06 @@ -45,7 +51,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Recipe transfer integration for the Crafting Grid. - Grid / EMI search box synchronization options. -[Unreleased]: https://github.com/refinedmods/refinedstorage-emi-integration/compare/v0.3.1...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage-emi-integration/compare/v0.3.2...HEAD + +[0.3.2]: https://github.com/refinedmods/refinedstorage-emi-integration/compare/v0.3.1...v0.3.2 [0.3.1]: https://github.com/refinedmods/refinedstorage-emi-integration/compare/v0.3.0...v0.3.1 diff --git a/README.md b/README.md index f566a35..61ef4c0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Refined Storage - EMI Integration [![Build Status](https://github.com/refinedmods/refinedstorage-emi-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-emi-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-emi-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-emi-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-emi-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-emi-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 - EMI Integration [![Build Status](https://github.com/refinedmods/refinedstorage-emi-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-emi-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-emi-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-emi-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-emi-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-emi-integration) [![Crowdin](https://badges.crowdin.net/refined-storage-emi-integration/localized.svg)](https://crowdin.com/project/refined-storage-emi-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 diff --git a/gradle.properties b/gradle.properties index 5d31aee..55ebeff 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,5 @@ -refinedstorageVersion=2.0.0-milestone.4.4 +refinedarchitectVersion=0.16.9 +refinedstorageVersion=2.0.0-milestone.4.5 emiVersion=1.1.10+1.21 # Gradle org.gradle.jvmargs=-Xmx1G diff --git a/refinedstorage-emi-integration-common/build.gradle.kts b/refinedstorage-emi-integration-common/build.gradle.kts index a591b36..316a34d 100644 --- a/refinedstorage-emi-integration-common/build.gradle.kts +++ b/refinedstorage-emi-integration-common/build.gradle.kts @@ -31,6 +31,6 @@ val refinedstorageVersion: String by project val emiVersion: String by project dependencies { - api("com.refinedmods.refinedstorage:refinedstorage-platform-common:${refinedstorageVersion}") + api("com.refinedmods.refinedstorage:refinedstorage-common:${refinedstorageVersion}") compileOnlyApi("dev.emi:emi-xplat-mojmap:${emiVersion}") } diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/Common.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/Common.java index 0e630ab..67a35f0 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/Common.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/Common.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.emi.common; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import net.minecraft.resources.ResourceLocation; @@ -10,13 +10,13 @@ public final class Common { private Common() { } - public static void init(final PlatformApi platformApi) { - platformApi.addIngredientConverter(new EmiRecipeModIngredientConverter()); - platformApi.getGridSynchronizerRegistry().register( + public static void init(final RefinedStorageApi api) { + api.addIngredientConverter(new EmiRecipeModIngredientConverter()); + api.getGridSynchronizerRegistry().register( ResourceLocation.fromNamespaceAndPath(MOD_ID, "emi"), new EmiGridSynchronizer(false) ); - platformApi.getGridSynchronizerRegistry().register( + api.getGridSynchronizerRegistry().register( ResourceLocation.fromNamespaceAndPath(MOD_ID, "emi_two_way"), new EmiGridSynchronizer(true) ); diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiDragDropHandlerImpl.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiDragDropHandlerImpl.java index 0e9dac6..d80dd28 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiDragDropHandlerImpl.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiDragDropHandlerImpl.java @@ -1,11 +1,11 @@ package com.refinedmods.refinedstorage.emi.common; -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 dev.emi.emi.api.EmiDragDropHandler; import dev.emi.emi.api.stack.EmiIngredient; @@ -22,7 +22,7 @@ public boolean dropStack(final Screen screen, final EmiIngredient stack, final i if (!(baseScreen.getMenu() instanceof AbstractResourceContainerMenu menu)) { return false; } - return PlatformApi.INSTANCE.getIngredientConverter().convertToResource(stack) + return RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(stack) .map(resource -> dropStack(menu, baseScreen, resource, x, y)) .orElse(false); } @@ -70,7 +70,7 @@ public void render(final Screen screen, if (!(baseScreen.getMenu() instanceof AbstractResourceContainerMenu menu)) { return; } - PlatformApi.INSTANCE.getIngredientConverter().convertToResource(dragged).ifPresent(resource -> { + RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(dragged).ifPresent(resource -> { final EmiDrawContext context = EmiDrawContext.wrap(draw); for (final ResourceSlot slot : menu.getResourceSlots()) { if (!slot.isFilter() || !slot.isValid(resource)) { diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiExclusionAreaImpl.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiExclusionAreaImpl.java index 2657028..b0d6209 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiExclusionAreaImpl.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiExclusionAreaImpl.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.emi.common; -import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; +import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen; import java.util.List; import java.util.function.Consumer; diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiGridSynchronizer.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiGridSynchronizer.java index fb45851..3355f1e 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiGridSynchronizer.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiGridSynchronizer.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.emi.common; -import com.refinedmods.refinedstorage.platform.common.grid.AbstractGridSynchronizer; +import com.refinedmods.refinedstorage.common.grid.AbstractGridSynchronizer; import javax.annotation.Nullable; diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeHandlerImpl.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeHandlerImpl.java index ef49a91..88105fb 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeHandlerImpl.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeHandlerImpl.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.emi.common; 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.util.List; import java.util.stream.Collectors; diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeModIngredientConverter.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeModIngredientConverter.java index 69b42de..239a205 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeModIngredientConverter.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/EmiRecipeModIngredientConverter.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.emi.common; -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; @@ -14,6 +14,7 @@ import net.minecraft.world.level.material.Fluid; class EmiRecipeModIngredientConverter implements RecipeModIngredientConverter { + @SuppressWarnings("UnstableApiUsage") @Override public Optional convertToResource(final Object ingredient) { if (ingredient instanceof FluidEmiStack fluid) { diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/GridEmiStackProvider.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/GridEmiStackProvider.java index c865c90..35c04e9 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/GridEmiStackProvider.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/GridEmiStackProvider.java @@ -1,9 +1,9 @@ package com.refinedmods.refinedstorage.emi.common; -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.emi.emi.api.EmiStackProvider; import dev.emi.emi.api.stack.EmiIngredient; @@ -24,7 +24,7 @@ public EmiStackInteraction getStackAt(final Screen screen, final int x, final in if (underlyingResource == null) { return EmiStackInteraction.EMPTY; } - return PlatformApi.INSTANCE.getIngredientConverter().convertToIngredient(underlyingResource).map( + return RefinedStorageApi.INSTANCE.getIngredientConverter().convertToIngredient(underlyingResource).map( ingredient -> new EmiStackInteraction((EmiIngredient) ingredient, null, false) ).orElse(EmiStackInteraction.EMPTY); } diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/RefinedStorageEmiPlugin.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/RefinedStorageEmiPlugin.java index bbc2be0..3f9ef23 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/RefinedStorageEmiPlugin.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/RefinedStorageEmiPlugin.java @@ -1,6 +1,6 @@ package com.refinedmods.refinedstorage.emi.common; -import com.refinedmods.refinedstorage.platform.common.content.Menus; +import com.refinedmods.refinedstorage.common.content.Menus; import dev.emi.emi.api.EmiEntrypoint; import dev.emi.emi.api.EmiPlugin; diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/ResourceEmiStackProvider.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/ResourceEmiStackProvider.java index b0a35b3..83ed9c9 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/ResourceEmiStackProvider.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/ResourceEmiStackProvider.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.emi.common; -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.emi.emi.api.EmiStackProvider; import dev.emi.emi.api.stack.EmiIngredient; @@ -19,7 +19,7 @@ public EmiStackInteraction getStackAt(final Screen screen, final int x, final in if (resource == null) { return EmiStackInteraction.EMPTY; } - return PlatformApi.INSTANCE.getIngredientConverter().convertToIngredient(resource).map( + return RefinedStorageApi.INSTANCE.getIngredientConverter().convertToIngredient(resource).map( ingredient -> new EmiStackInteraction((EmiIngredient) ingredient, null, false) ).orElse(EmiStackInteraction.EMPTY); } diff --git a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/package-info.java b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/package-info.java index 84d6b98..39c8dbd 100644 --- a/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/package-info.java +++ b/refinedstorage-emi-integration-common/src/main/java/com/refinedmods/refinedstorage/emi/common/package-info.java @@ -1,4 +1,7 @@ @ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault package com.refinedmods.refinedstorage.emi.common; +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-emi-integration-fabric/build.gradle.kts b/refinedstorage-emi-integration-fabric/build.gradle.kts index 0d557ac..3124366 100644 --- a/refinedstorage-emi-integration-fabric/build.gradle.kts +++ b/refinedstorage-emi-integration-fabric/build.gradle.kts @@ -41,7 +41,7 @@ val refinedstorageVersion: String by project val emiVersion: String by project dependencies { - modApi("com.refinedmods.refinedstorage:refinedstorage-platform-fabric:${refinedstorageVersion}") + modApi("com.refinedmods.refinedstorage:refinedstorage-fabric:${refinedstorageVersion}") modRuntimeOnly("dev.emi:emi-fabric:${emiVersion}") modCompileOnlyApi("dev.emi:emi-fabric:${emiVersion}") } diff --git a/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/EmiRefinedStoragePlugin.java b/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/EmiRefinedStoragePlugin.java index 142bf94..11439ea 100644 --- a/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/EmiRefinedStoragePlugin.java +++ b/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/EmiRefinedStoragePlugin.java @@ -1,13 +1,13 @@ package com.refinedmods.refinedstorage.emi.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.emi.common.Common.init; public class EmiRefinedStoragePlugin implements RefinedStoragePlugin { @Override - public void onPlatformApiAvailable(final PlatformApi platformApi) { - init(platformApi); + public void onApiAvailable(final RefinedStorageApi api) { + init(api); } } diff --git a/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/package-info.java b/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/package-info.java index 22f4ffd..a06a359 100644 --- a/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/package-info.java +++ b/refinedstorage-emi-integration-fabric/src/main/java/com/refinedmods/refinedstorage/emi/fabric/package-info.java @@ -1,4 +1,7 @@ @ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault package com.refinedmods.refinedstorage.emi.fabric; +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-emi-integration-fabric/src/main/resources/fabric.mod.json b/refinedstorage-emi-integration-fabric/src/main/resources/fabric.mod.json index 2906408..ec1d971 100644 --- a/refinedstorage-emi-integration-fabric/src/main/resources/fabric.mod.json +++ b/refinedstorage-emi-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", "emi": ">=1.1.10", "java": ">=17" } diff --git a/refinedstorage-emi-integration-neoforge/build.gradle.kts b/refinedstorage-emi-integration-neoforge/build.gradle.kts index 96f0834..379e987 100644 --- a/refinedstorage-emi-integration-neoforge/build.gradle.kts +++ b/refinedstorage-emi-integration-neoforge/build.gradle.kts @@ -33,7 +33,7 @@ val refinedstorageVersion: String by project val emiVersion: String by project dependencies { - api("com.refinedmods.refinedstorage:refinedstorage-platform-neoforge:${refinedstorageVersion}") + api("com.refinedmods.refinedstorage:refinedstorage-neoforge:${refinedstorageVersion}") runtimeOnly("dev.emi:emi-neoforge:${emiVersion}") compileOnlyApi("dev.emi:emi-neoforge:${emiVersion}") } diff --git a/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/ModInitializer.java b/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/ModInitializer.java index be4d2c8..97ff590 100644 --- a/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/ModInitializer.java +++ b/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/ModInitializer.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.emi.forge; +import com.refinedmods.refinedstorage.common.api.RefinedStorageApi; import com.refinedmods.refinedstorage.emi.common.Common; -import com.refinedmods.refinedstorage.platform.api.PlatformApi; import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.SubscribeEvent; @@ -18,6 +18,6 @@ public ModInitializer(final IEventBus eventBus) { @SubscribeEvent public static void onCommonSetup(final FMLCommonSetupEvent e) { - init(PlatformApi.INSTANCE); + init(RefinedStorageApi.INSTANCE); } } diff --git a/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/package-info.java b/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/package-info.java index 9570cb2..ec280fd 100644 --- a/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/package-info.java +++ b/refinedstorage-emi-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/emi/forge/package-info.java @@ -1,4 +1,7 @@ @ParametersAreNonnullByDefault +@FieldsAndMethodsAreNonnullByDefault package com.refinedmods.refinedstorage.emi.forge; +import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault; + import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage-emi-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml b/refinedstorage-emi-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml index 9742f22..b766a35 100644 --- a/refinedstorage-emi-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/refinedstorage-emi-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -14,7 +14,7 @@ EMI integration for Refined Storage. [[dependencies.refinedstorage_emi_integration]] modId = "refinedstorage" type = "required" -versionRange = "2.0.0-milestone.4.2" +versionRange = "2.0.0-milestone.4.5" side = "BOTH" [[dependencies.refinedstorage_emi_integration]] modId = "emi" diff --git a/settings.gradle.kts b/settings.gradle.kts index 1a750e4..fc6f440 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") - } } + val refinedarchitectVersion: String by settings 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") + 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) } }