diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2a7493..53ca679 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.13.4 + uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.15.1 with: mutation-testing: false secrets: inherit diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 5ea1d94..f1a44f0 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.13.4 + uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.15.1 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 9f9ee90..68f5d19 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.13.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.15.1 \ No newline at end of file diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index ce76bfc..d5a4fcf 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.13.4 + uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.15.1 secrets: inherit with: project-name: 'Refined Storage - JEI Integration' diff --git a/.github/workflows/resolved-issue-locking.yml b/.github/workflows/resolved-issue-locking.yml index 16b1cf9..f40e8ed 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.13.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.15.1 \ No newline at end of file diff --git a/.github/workflows/validate-branch-name.yml b/.github/workflows/validate-branch-name.yml index b2ddb77..0e3e2e1 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.13.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.15.1 \ No newline at end of file diff --git a/.github/workflows/validate-changelog.yml b/.github/workflows/validate-changelog.yml index 2adc54f..e16cf7e 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.13.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.15.1 \ No newline at end of file diff --git a/.github/workflows/validate-commit-messages.yml b/.github/workflows/validate-commit-messages.yml index 8ef06cd..dbef381 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.13.4 \ No newline at end of file + uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.15.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2982d38..0746445 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.0] - 2024-07-06 + +### Fixed + +- Support for Refined Storage v2.0.0-milestone.4.0. + ## [0.2.2] - 2024-06-20 ### Fixed @@ -36,7 +42,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Recipe transfer integration for the Crafting Grid. - Grid / JEI search box synchronization options. -[Unreleased]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.2.2...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.3.0...HEAD + +[0.3.0]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.2.2...v0.3.0 [0.2.2]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.2.1...v0.2.2 diff --git a/gradle.properties b/gradle.properties index 9ae9233..8acfd86 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -refinedstorageVersion=2.0.0-milestone.3.13 -jeiVersion=17.3.0.52 +refinedstorageVersion=2.0.0-milestone.4.1 +jeiVersion=19.1.0.17 # Gradle org.gradle.jvmargs=-Xmx1G diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23..a441313 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/refinedstorage-jei-integration-common/build.gradle b/refinedstorage-jei-integration-common/build.gradle index ce91890..a731684 100644 --- a/refinedstorage-jei-integration-common/build.gradle +++ b/refinedstorage-jei-integration-common/build.gradle @@ -21,7 +21,7 @@ repositories { commonProject() dependencies { - api "com.refinedmods.refinedstorage2:refinedstorage2-platform-common:${refinedstorageVersion}" + api "com.refinedmods.refinedstorage:refinedstorage-platform-common:${refinedstorageVersion}" api "mezz.jei:jei-${minecraftVersion}-common-api:${jeiVersion}" api "mezz.jei:jei-${minecraftVersion}-common:${jeiVersion}" } diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Common.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Common.java index e013854..d7046a7 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Common.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Common.java @@ -1,6 +1,7 @@ package com.refinedmods.refinedstorage.jei.common; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage.platform.api.PlatformApi; + import net.minecraft.resources.ResourceLocation; import static java.util.Objects.requireNonNull; @@ -24,11 +25,11 @@ public static Platform getPlatform() { public static void init(final PlatformApi platformApi) { platformApi.addIngredientConverter(new JeiRecipeModIngredientConverter()); platformApi.getGridSynchronizerRegistry().register( - new ResourceLocation(Common.MOD_ID, "jei"), + ResourceLocation.fromNamespaceAndPath(Common.MOD_ID, "jei"), new JeiGridSynchronizer(false) ); platformApi.getGridSynchronizerRegistry().register( - new ResourceLocation(Common.MOD_ID, "jei_two_way"), + ResourceLocation.fromNamespaceAndPath(Common.MOD_ID, "jei_two_way"), new JeiGridSynchronizer(true) ); } diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/CraftingGridRecipeTransferHandler.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/CraftingGridRecipeTransferHandler.java index 0be287d..143654e 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/CraftingGridRecipeTransferHandler.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/CraftingGridRecipeTransferHandler.java @@ -1,14 +1,15 @@ package com.refinedmods.refinedstorage.jei.common; +import com.refinedmods.refinedstorage.api.resource.list.ResourceList; +import com.refinedmods.refinedstorage.platform.common.content.Menus; +import com.refinedmods.refinedstorage.platform.common.grid.CraftingGridContainerMenu; +import com.refinedmods.refinedstorage.platform.common.support.resource.ItemResource; + import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import javax.annotation.Nullable; -import com.refinedmods.refinedstorage2.api.resource.list.ResourceList; -import com.refinedmods.refinedstorage2.platform.common.content.Menus; -import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResource; import mezz.jei.api.constants.RecipeTypes; import mezz.jei.api.gui.ingredient.IRecipeSlotView; import mezz.jei.api.gui.ingredient.IRecipeSlotsView; diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ExclusionZonesGuiContainerHandler.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ExclusionZonesGuiContainerHandler.java index 112a0da..011287f 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ExclusionZonesGuiContainerHandler.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ExclusionZonesGuiContainerHandler.java @@ -1,8 +1,9 @@ package com.refinedmods.refinedstorage.jei.common; +import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; + import java.util.List; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import mezz.jei.api.gui.handlers.IGuiContainerHandler; import net.minecraft.client.renderer.Rect2i; diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GhostIngredientHandler.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GhostIngredientHandler.java index f91364a..ad6b3c8 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GhostIngredientHandler.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GhostIngredientHandler.java @@ -1,15 +1,16 @@ package com.refinedmods.refinedstorage.jei.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 java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.common.Platform; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; -import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; -import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot; import mezz.jei.api.gui.handlers.IGhostIngredientHandler; import mezz.jei.api.ingredients.ITypedIngredient; import net.minecraft.client.renderer.Rect2i; @@ -50,7 +51,7 @@ public void onComplete() { // no op } - private class TargetImpl implements Target { + private static class TargetImpl implements Target { private final Rect2i area; private final int slotIndex; @@ -70,10 +71,7 @@ public void accept(final I ingredient) { } private void accept(final PlatformResourceKey resource) { - Platform.INSTANCE.getClientToServerCommunications().sendResourceFilterSlotChange( - resource, - slotIndex - ); + C2SPackets.sendResourceFilterSlotChange(resource, slotIndex); } } } diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GridGuiContainerHandler.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GridGuiContainerHandler.java index 7cf476b..db4701e 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GridGuiContainerHandler.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/GridGuiContainerHandler.java @@ -1,11 +1,12 @@ package com.refinedmods.refinedstorage.jei.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 java.util.Optional; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.grid.view.PlatformGridResource; -import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; import mezz.jei.api.gui.handlers.IGuiContainerHandler; import mezz.jei.api.ingredients.IIngredientHelper; import mezz.jei.api.ingredients.ITypedIngredient; diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiGridSynchronizer.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiGridSynchronizer.java index c39595f..2bc69ae 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiGridSynchronizer.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiGridSynchronizer.java @@ -1,8 +1,9 @@ package com.refinedmods.refinedstorage.jei.common; +import com.refinedmods.refinedstorage.platform.common.grid.AbstractGridSynchronizer; + import javax.annotation.Nullable; -import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridSynchronizer; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiRecipeModIngredientConverter.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiRecipeModIngredientConverter.java index ba26af1..8b1a538 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiRecipeModIngredientConverter.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/JeiRecipeModIngredientConverter.java @@ -1,11 +1,12 @@ package com.refinedmods.refinedstorage.jei.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 java.util.Optional; -import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; -import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResource; import mezz.jei.api.helpers.IPlatformFluidHelper; import mezz.jei.common.platform.Services; import net.minecraft.world.item.ItemStack; @@ -24,6 +25,7 @@ public Optional convertToResource(final Object ingredient) } @Override + @SuppressWarnings("deprecation") public Optional convertToIngredient(final PlatformResourceKey resource) { if (resource instanceof ItemResource itemResource) { return Optional.of(itemResource.toItemStack()); @@ -31,9 +33,9 @@ public Optional convertToIngredient(final PlatformResourceKey resource) if (resource instanceof FluidResource fluidResource) { final IPlatformFluidHelper fluidHelper = Services.PLATFORM.getFluidHelper(); return Optional.of(fluidHelper.create( - fluidResource.fluid(), + fluidResource.fluid().builtInRegistryHolder(), fluidHelper.bucketVolume(), - fluidResource.tag() + fluidResource.components() )); } return Optional.empty(); diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Platform.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Platform.java index be2f7f7..885e1ab 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Platform.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/Platform.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.jei.common; -import java.util.Optional; +import com.refinedmods.refinedstorage.platform.common.support.resource.FluidResource; -import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResource; +import java.util.Optional; public interface Platform { Optional convertJeiIngredientToFluid(Object ingredient); diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/RefinedStorageModPlugin.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/RefinedStorageModPlugin.java index 789061f..482a5de 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/RefinedStorageModPlugin.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/RefinedStorageModPlugin.java @@ -1,9 +1,10 @@ package com.refinedmods.refinedstorage.jei.common; +import com.refinedmods.refinedstorage.platform.common.grid.screen.AbstractGridScreen; +import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen; + import javax.annotation.Nullable; -import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; import mezz.jei.api.constants.RecipeTypes; @@ -14,7 +15,7 @@ @JeiPlugin public class RefinedStorageModPlugin implements IModPlugin { - private static final ResourceLocation ID = new ResourceLocation(Common.MOD_ID, "plugin"); + private static final ResourceLocation ID = ResourceLocation.fromNamespaceAndPath(Common.MOD_ID, "plugin"); @Nullable private static IJeiRuntime runtime; diff --git a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ResourceGuiContainerHandler.java b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ResourceGuiContainerHandler.java index f9808f6..44d4ed9 100644 --- a/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ResourceGuiContainerHandler.java +++ b/refinedstorage-jei-integration-common/src/main/java/com/refinedmods/refinedstorage/jei/common/ResourceGuiContainerHandler.java @@ -1,11 +1,12 @@ package com.refinedmods.refinedstorage.jei.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 java.util.Optional; import javax.annotation.Nullable; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import mezz.jei.api.gui.handlers.IGuiContainerHandler; import mezz.jei.api.ingredients.IIngredientHelper; import mezz.jei.api.ingredients.ITypedIngredient; diff --git a/refinedstorage-jei-integration-fabric/build.gradle b/refinedstorage-jei-integration-fabric/build.gradle index de007bc..a1ce81c 100644 --- a/refinedstorage-jei-integration-fabric/build.gradle +++ b/refinedstorage-jei-integration-fabric/build.gradle @@ -29,7 +29,7 @@ repositories { } dependencies { - modApi "com.refinedmods.refinedstorage2:refinedstorage2-platform-fabric:${refinedstorageVersion}" + modApi "com.refinedmods.refinedstorage:refinedstorage-platform-fabric:${refinedstorageVersion}" modRuntimeOnly "mezz.jei:jei-${minecraftVersion}-fabric:${jeiVersion}" modCompileOnlyApi "mezz.jei:jei-${minecraftVersion}-common-api:${jeiVersion}" modCompileOnlyApi "mezz.jei:jei-${minecraftVersion}-fabric-api:${jeiVersion}" diff --git a/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/FabricPlatform.java b/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/FabricPlatform.java index c8a73c6..4c7fceb 100644 --- a/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/FabricPlatform.java +++ b/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/FabricPlatform.java @@ -1,20 +1,19 @@ package com.refinedmods.refinedstorage.jei.fabric; import com.refinedmods.refinedstorage.jei.common.Platform; +import com.refinedmods.refinedstorage.platform.common.support.resource.FluidResource; import java.util.Optional; -import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResource; import mezz.jei.api.fabric.ingredients.fluids.IJeiFluidIngredient; +import static com.refinedmods.refinedstorage.platform.fabric.support.resource.VariantUtil.ofFluidVariant; + public class FabricPlatform implements Platform { @Override public Optional convertJeiIngredientToFluid(final Object ingredient) { if (ingredient instanceof IJeiFluidIngredient fluidIngredient) { - return Optional.of(new FluidResource( - fluidIngredient.getFluid(), - fluidIngredient.getTag().orElse(null) - )); + return Optional.of(ofFluidVariant(fluidIngredient.getFluidVariant())); } return Optional.empty(); } diff --git a/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/JeiRefinedStoragePlugin.java b/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/JeiRefinedStoragePlugin.java index ae72857..0cf3514 100644 --- a/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/JeiRefinedStoragePlugin.java +++ b/refinedstorage-jei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/jei/fabric/JeiRefinedStoragePlugin.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.jei.fabric; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.RefinedStoragePlugin; +import com.refinedmods.refinedstorage.platform.api.PlatformApi; +import com.refinedmods.refinedstorage.platform.api.RefinedStoragePlugin; import static com.refinedmods.refinedstorage.jei.common.Common.init; diff --git a/refinedstorage-jei-integration-fabric/src/main/resources/fabric.mod.json b/refinedstorage-jei-integration-fabric/src/main/resources/fabric.mod.json index f4414c5..2520901 100644 --- a/refinedstorage-jei-integration-fabric/src/main/resources/fabric.mod.json +++ b/refinedstorage-jei-integration-fabric/src/main/resources/fabric.mod.json @@ -29,14 +29,15 @@ "links": { "modmenu.discord": "https://discordapp.com/invite/VYzsydb" }, - "parent": "refinedstorage2" + "parent": "refinedstorage" } }, "depends": { "fabricloader": ">=0.14.6", "fabric-api": "*", - "minecraft": "~1.20.4", - "jei": ">=17", + "minecraft": "~1.21", + "refinedstorage": ">=2.0.0-milestone.4.0", + "jei": ">=19", "java": ">=17" } } diff --git a/refinedstorage-jei-integration-forge/.gitignore b/refinedstorage-jei-integration-forge/.gitignore deleted file mode 100644 index 643cb18..0000000 --- a/refinedstorage-jei-integration-forge/.gitignore +++ /dev/null @@ -1 +0,0 @@ -runs/ \ No newline at end of file diff --git a/refinedstorage-jei-integration-neoforge/.gitignore b/refinedstorage-jei-integration-neoforge/.gitignore new file mode 100644 index 0000000..737e26b --- /dev/null +++ b/refinedstorage-jei-integration-neoforge/.gitignore @@ -0,0 +1 @@ +run/ \ No newline at end of file diff --git a/refinedstorage-jei-integration-forge/build.gradle b/refinedstorage-jei-integration-neoforge/build.gradle similarity index 71% rename from refinedstorage-jei-integration-forge/build.gradle rename to refinedstorage-jei-integration-neoforge/build.gradle index d8a3555..aa7b197 100644 --- a/refinedstorage-jei-integration-forge/build.gradle +++ b/refinedstorage-jei-integration-neoforge/build.gradle @@ -2,9 +2,9 @@ plugins { id 'java-library' } -archivesBaseName = 'refinedstorage-jei-integration-forge' +archivesBaseName = 'refinedstorage-jei-integration-neoforge' -forgeProject("refinedstorage_jei_integration", project(":refinedstorage-jei-integration-common")) +neoForgeProject("refinedstorage_jei_integration", project(":refinedstorage-jei-integration-common")) repositories { maven { @@ -21,7 +21,7 @@ repositories { } dependencies { - api "com.refinedmods.refinedstorage2:refinedstorage2-platform-forge:${refinedstorageVersion}" + api "com.refinedmods.refinedstorage:refinedstorage-platform-neoforge:${refinedstorageVersion}" runtimeOnly "mezz.jei:jei-${minecraftVersion}-neoforge:${jeiVersion}" compileOnlyApi "mezz.jei:jei-${minecraftVersion}-common-api:${jeiVersion}" compileOnlyApi "mezz.jei:jei-${minecraftVersion}-neoforge-api:${jeiVersion}" diff --git a/refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ForgePlatform.java b/refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ForgePlatform.java similarity index 72% rename from refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ForgePlatform.java rename to refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ForgePlatform.java index d8ac734..0edef51 100644 --- a/refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ForgePlatform.java +++ b/refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ForgePlatform.java @@ -1,13 +1,13 @@ package com.refinedmods.refinedstorage.jei.forge; import com.refinedmods.refinedstorage.jei.common.Platform; +import com.refinedmods.refinedstorage.platform.common.support.resource.FluidResource; import java.util.Optional; -import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResource; import net.neoforged.neoforge.fluids.FluidStack; -import static com.refinedmods.refinedstorage2.platform.forge.support.resource.VariantUtil.ofFluidStack; +import static com.refinedmods.refinedstorage.platform.neoforge.support.resource.VariantUtil.ofFluidStack; public class ForgePlatform implements Platform { @Override diff --git a/refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ModInitializer.java b/refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ModInitializer.java similarity index 91% rename from refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ModInitializer.java rename to refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ModInitializer.java index f6a266d..4009075 100644 --- a/refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ModInitializer.java +++ b/refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/ModInitializer.java @@ -1,8 +1,8 @@ package com.refinedmods.refinedstorage.jei.forge; import com.refinedmods.refinedstorage.jei.common.Common; +import com.refinedmods.refinedstorage.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import net.neoforged.bus.api.IEventBus; import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.fml.common.Mod; diff --git a/refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/package-info.java b/refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/package-info.java similarity index 100% rename from refinedstorage-jei-integration-forge/src/main/java/com/refinedmods/refinedstorage/jei/forge/package-info.java rename to refinedstorage-jei-integration-neoforge/src/main/java/com/refinedmods/refinedstorage/jei/forge/package-info.java diff --git a/refinedstorage-jei-integration-forge/src/main/resources/META-INF/mods.toml b/refinedstorage-jei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml similarity index 76% rename from refinedstorage-jei-integration-forge/src/main/resources/META-INF/mods.toml rename to refinedstorage-jei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml index 0eff57c..4800a01 100644 --- a/refinedstorage-jei-integration-forge/src/main/resources/META-INF/mods.toml +++ b/refinedstorage-jei-integration-neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -6,18 +6,18 @@ license = "MIT" modId = "refinedstorage_jei_integration" version = "${version}" displayName = "Refined Storage - JEI Integration" -displayURL = "https://github.com/refinedmods/refinedstorage-jei-integration" +displayURL = "https://refinedmods.com/refined-storage" authors = "Refined Mods" description = ''' JEI integration for Refined Storage. ''' [[dependencies.refinedstorage_jei_integration]] -modId = "refinedstorage2" +modId = "refinedstorage" type = "required" -versionRange = "2.0.0-milestone.3.6" +versionRange = "2.0.0-milestone.4.0" side = "BOTH" [[dependencies.refinedstorage_jei_integration]] modId = "jei" type = "required" -versionRange = "[17,)" +versionRange = "[19,)" side = "BOTH" diff --git a/refinedstorage-jei-integration-forge/src/main/resources/pack.mcmeta b/refinedstorage-jei-integration-neoforge/src/main/resources/pack.mcmeta similarity index 100% rename from refinedstorage-jei-integration-forge/src/main/resources/pack.mcmeta rename to refinedstorage-jei-integration-neoforge/src/main/resources/pack.mcmeta diff --git a/settings.gradle b/settings.gradle index 2c5e81b..f9e50b7 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,4 +1,4 @@ -gradle.ext.refinedArchitectVersion = "0.13.4" +gradle.ext.refinedArchitectVersion = "0.15.1" dependencyResolutionManagement { repositories { @@ -14,5 +14,5 @@ dependencyResolutionManagement { rootProject.name = 'refinedstorage-jei-integration' include 'refinedstorage-jei-integration-common' -include 'refinedstorage-jei-integration-forge' +include 'refinedstorage-jei-integration-neoforge' include 'refinedstorage-jei-integration-fabric'