From 970d96be4d8755fb2abadeb8a888c3f28d15f2e2 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 18 Jun 2024 12:29:44 +0200 Subject: [PATCH 1/5] build: remove trinkets and curios repo --- gradle.properties | 2 +- .../build.gradle | 12 ++++-------- .../build.gradle | 18 +++++++----------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/gradle.properties b/gradle.properties index 991e188..f73926d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -refinedstorageVersion=2.0.0-milestone.3.10 +refinedstorageVersion=2.0.0-milestone.3.13 architecturyVersion=11.1.17 clothConfigVersion=13.0.121 reiVersion=14.1.727 diff --git a/refinedstorage-rei-integration-fabric/build.gradle b/refinedstorage-rei-integration-fabric/build.gradle index 5d57de9..4893da5 100644 --- a/refinedstorage-rei-integration-fabric/build.gradle +++ b/refinedstorage-rei-integration-fabric/build.gradle @@ -10,21 +10,17 @@ repositories { password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX" } } - maven { - name = 'ModMenu' - url 'https://maven.terraformersmc.com/' - } maven { name = 'Cloth Config, REI' url 'https://maven.shedaniel.me/' } maven { - name = 'NoIndium' - url = 'https://maven.cafeteria.dev/releases/' + name = 'ModMenu' + url 'https://maven.terraformersmc.com/' } maven { - name = "Trinkets" - url = 'https://maven.ladysnake.org/releases' + name = 'NoIndium' + url = 'https://maven.cafeteria.dev/releases/' } } diff --git a/refinedstorage-rei-integration-forge/build.gradle b/refinedstorage-rei-integration-forge/build.gradle index e4e727a..ae80fa2 100644 --- a/refinedstorage-rei-integration-forge/build.gradle +++ b/refinedstorage-rei-integration-forge/build.gradle @@ -7,6 +7,13 @@ archivesBaseName = 'refinedstorage-rei-integration-forge' forgeProject("refinedstorage_rei_integration", project(":refinedstorage-rei-integration-common")) repositories { + maven { + url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage2") + credentials { + username = "anything" + password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX" + } + } maven { name = 'REI' url 'https://maven.shedaniel.me/' @@ -15,17 +22,6 @@ repositories { name = 'Architectury' url "https://maven.architectury.dev/" } - maven { - name = 'Curios' - url = "https://maven.theillusivec4.top/" - } - maven { - url = uri("https://maven.pkg.github.com/refinedmods/refinedstorage2") - credentials { - username = "anything" - password = "\u0067hp_oGjcDFCn8jeTzIj4Ke9pLoEVtpnZMP4VQgaX" - } - } } dependencies { From 1e5d4631bf257f8cc58ae42a30e509ee78a61851 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Tue, 18 Jun 2024 13:08:21 +0200 Subject: [PATCH 2/5] refactor: use refined storage plugin system to get platform api --- .../rei/fabric/ClientModInitializerImpl.java | 19 ------------------- .../rei/fabric/ReiRefinedStoragePlugin.java | 16 ++++++++++++++++ .../src/main/resources/fabric.mod.json | 4 ++-- 3 files changed, 18 insertions(+), 21 deletions(-) delete mode 100644 refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ClientModInitializerImpl.java create mode 100644 refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRefinedStoragePlugin.java diff --git a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ClientModInitializerImpl.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ClientModInitializerImpl.java deleted file mode 100644 index fba0c38..0000000 --- a/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ClientModInitializerImpl.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.refinedmods.refinedstorage.rei.fabric; - -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import net.fabricmc.api.ClientModInitializer; - -import static com.refinedmods.refinedstorage.rei.common.Common.SYNCHRONIZER_ID; -import static com.refinedmods.refinedstorage.rei.common.Common.TWO_WAY_SYNCHRONIZER_ID; - -public class ClientModInitializerImpl implements ClientModInitializer { - @Override - public void onInitializeClient() { - PlatformApi.INSTANCE.addIngredientConverter(new ReiRecipeModIngredientConverter()); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register(SYNCHRONIZER_ID, new ReiGridSynchronizer(false)); - PlatformApi.INSTANCE.getGridSynchronizerRegistry().register( - TWO_WAY_SYNCHRONIZER_ID, - new ReiGridSynchronizer(true) - ); - } -} 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 new file mode 100644 index 0000000..8d7d855 --- /dev/null +++ b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/ReiRefinedStoragePlugin.java @@ -0,0 +1,16 @@ +package com.refinedmods.refinedstorage.rei.fabric; + +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; +import com.refinedmods.refinedstorage2.platform.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)); + } +} 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 413dbc3..a865411 100644 --- a/refinedstorage-rei-integration-fabric/src/main/resources/fabric.mod.json +++ b/refinedstorage-rei-integration-fabric/src/main/resources/fabric.mod.json @@ -14,8 +14,8 @@ "license": "MIT", "environment": "*", "entrypoints": { - "client": [ - "com.refinedmods.refinedstorage.rei.fabric.ClientModInitializerImpl" + "refinedstorage_plugin": [ + "com.refinedmods.refinedstorage.rei.fabric.ReiRefinedStoragePlugin" ], "rei_client": [ "com.refinedmods.refinedstorage.rei.fabric.ReiClientPlugin" From 1841375e40681bf01d32abc5e41b9f84bbd13a4f Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Thu, 20 Jun 2024 22:20:18 +0200 Subject: [PATCH 3/5] fix: potential load order issues PlatformApi may not be available yet on Fabric. --- CHANGELOG.md | 4 ++++ .../rei/fabric/DraggableStackVisitorImpl.java | 12 +++--------- .../rei/fabric/GridFocusedStackProvider.java | 12 ++++-------- .../refinedstorage/rei/fabric/ReiClientPlugin.java | 7 +++---- .../rei/fabric/ResourceFocusedStackProvider.java | 12 ++++-------- .../rei/forge/DraggableStackVisitorImpl.java | 12 +++--------- .../rei/forge/GridFocusedStackProvider.java | 12 ++++-------- .../refinedstorage/rei/forge/ReiClientPlugin.java | 7 +++---- .../rei/forge/ResourceFocusedStackProvider.java | 12 ++++-------- 9 files changed, 32 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bbed8f..4ebf08a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed + +- Potential load order issues on Fabric. + ## [0.1.1] - 2024-06-16 ### Fixed 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 347e902..2df4d00 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 @@ -4,8 +4,8 @@ import java.util.List; import java.util.stream.Stream; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; @@ -19,12 +19,6 @@ class DraggableStackVisitorImpl implements DraggableStackVisitor> { - private final RecipeModIngredientConverter ingredientConverter; - - DraggableStackVisitorImpl(final RecipeModIngredientConverter ingredientConverter) { - this.ingredientConverter = ingredientConverter; - } - @Override public Stream getDraggableAcceptingBounds( final DraggingContext> context, @@ -34,7 +28,7 @@ public Stream getDraggableAcceptingBounds( final var menu = screen.getMenu(); final var value = stack.getStack().getValue(); final List bounds = new ArrayList<>(); - ingredientConverter.convertToResource(value).ifPresent(resource -> { + PlatformApi.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))); @@ -52,7 +46,7 @@ public DraggedAcceptorResult acceptDraggedStack( final var screen = context.getScreen(); final var menu = screen.getMenu(); final Object value = stack.getStack().getValue(); - return ingredientConverter.convertToResource(value) + return PlatformApi.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/GridFocusedStackProvider.java b/refinedstorage-rei-integration-fabric/src/main/java/com/refinedmods/refinedstorage/rei/fabric/GridFocusedStackProvider.java index dfd53a9..a80ecf7 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,7 +1,7 @@ package com.refinedmods.refinedstorage.rei.fabric; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -10,12 +10,6 @@ import net.minecraft.client.gui.screens.Screen; class GridFocusedStackProvider implements FocusedStackProvider { - private final RecipeModIngredientConverter converter; - - GridFocusedStackProvider(final RecipeModIngredientConverter converter) { - this.converter = converter; - } - @Override public CompoundEventResult> provide(final Screen screen, final Point mouse) { if (!(screen instanceof AbstractGridScreen gridScreen)) { @@ -25,7 +19,9 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (resource == null) { return CompoundEventResult.pass(); } - final Object converted = converter.convertToIngredient(resource).orElse(null); + final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + .convertToIngredient(resource) + .orElse(null); if (converted instanceof EntryStack stack) { return CompoundEventResult.interruptTrue(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 5e08f2f..305baf9 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 @@ -32,10 +32,9 @@ public class ReiClientPlugin implements REIClientPlugin { @Override public void registerScreens(final ScreenRegistry registry) { - final RecipeModIngredientConverter converter = PlatformApi.INSTANCE.getIngredientConverter(); - registry.registerFocusedStack(new GridFocusedStackProvider(converter)); - registry.registerFocusedStack(new ResourceFocusedStackProvider(converter)); - registry.registerDraggableStackVisitor(new DraggableStackVisitorImpl(converter)); + registry.registerFocusedStack(new GridFocusedStackProvider()); + registry.registerFocusedStack(new ResourceFocusedStackProvider()); + registry.registerDraggableStackVisitor(new DraggableStackVisitorImpl()); } @Override 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 525da1e..de7f6f8 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,7 +1,7 @@ package com.refinedmods.refinedstorage.rei.fabric; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; 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.AbstractBaseScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -10,12 +10,6 @@ import net.minecraft.client.gui.screens.Screen; class ResourceFocusedStackProvider implements FocusedStackProvider { - private final RecipeModIngredientConverter converter; - - ResourceFocusedStackProvider(final RecipeModIngredientConverter converter) { - this.converter = converter; - } - @Override public CompoundEventResult> provide(final Screen screen, final Point mouse) { if (!(screen instanceof AbstractBaseScreen baseScreen)) { @@ -25,7 +19,9 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (hoveredResource == null) { return CompoundEventResult.pass(); } - final Object converted = converter.convertToIngredient(hoveredResource).orElse(null); + final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + .convertToIngredient(hoveredResource) + .orElse(null); if (converted instanceof EntryStack stack) { return CompoundEventResult.interruptTrue(stack); } diff --git a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java index 8e8676c..f2453ef 100644 --- a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java +++ b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/DraggableStackVisitorImpl.java @@ -4,8 +4,8 @@ import java.util.List; import java.util.stream.Stream; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.Platform; import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen; import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu; @@ -19,12 +19,6 @@ class DraggableStackVisitorImpl implements DraggableStackVisitor> { - private final RecipeModIngredientConverter ingredientConverter; - - DraggableStackVisitorImpl(final RecipeModIngredientConverter ingredientConverter) { - this.ingredientConverter = ingredientConverter; - } - @Override public Stream getDraggableAcceptingBounds( final DraggingContext> context, @@ -34,7 +28,7 @@ public Stream getDraggableAcceptingBounds( final var menu = screen.getMenu(); final var value = stack.getStack().getValue(); final List bounds = new ArrayList<>(); - ingredientConverter.convertToResource(value).ifPresent(resource -> { + PlatformApi.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))); @@ -52,7 +46,7 @@ public DraggedAcceptorResult acceptDraggedStack( final var screen = context.getScreen(); final var menu = screen.getMenu(); final Object value = stack.getStack().getValue(); - return ingredientConverter.convertToResource(value) + return PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value) .map(resource -> accept(context, menu, screen, resource)) .orElse(DraggedAcceptorResult.PASS); } diff --git a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java index 4e40cfa..36da962 100644 --- a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java +++ b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/GridFocusedStackProvider.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.rei.forge; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -10,12 +10,6 @@ import net.minecraft.client.gui.screens.Screen; class GridFocusedStackProvider implements FocusedStackProvider { - private final RecipeModIngredientConverter converter; - - GridFocusedStackProvider(final RecipeModIngredientConverter converter) { - this.converter = converter; - } - @Override public CompoundEventResult> provide(final Screen screen, final Point mouse) { if (!(screen instanceof AbstractGridScreen gridScreen)) { @@ -25,7 +19,9 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (underlyingResource == null) { return CompoundEventResult.pass(); } - final Object converted = converter.convertToIngredient(underlyingResource).orElse(null); + final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + .convertToIngredient(underlyingResource) + .orElse(null); if (converted instanceof EntryStack stack) { return CompoundEventResult.interruptTrue(stack); } diff --git a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java index b3eeef2..74d2cbe 100644 --- a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java +++ b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java @@ -31,10 +31,9 @@ public class ReiClientPlugin implements REIClientPlugin { @Override public void registerScreens(final ScreenRegistry registry) { - final RecipeModIngredientConverter converter = PlatformApi.INSTANCE.getIngredientConverter(); - registry.registerFocusedStack(new GridFocusedStackProvider(converter)); - registry.registerFocusedStack(new ResourceFocusedStackProvider(converter)); - registry.registerDraggableStackVisitor(new DraggableStackVisitorImpl(converter)); + registry.registerFocusedStack(new GridFocusedStackProvider()); + registry.registerFocusedStack(new ResourceFocusedStackProvider()); + registry.registerDraggableStackVisitor(new DraggableStackVisitorImpl()); } @Override diff --git a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java index 9d4d6fd..457dd19 100644 --- a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java +++ b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ResourceFocusedStackProvider.java @@ -1,7 +1,7 @@ package com.refinedmods.refinedstorage.rei.forge; +import com.refinedmods.refinedstorage2.platform.api.PlatformApi; 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.AbstractBaseScreen; import dev.architectury.event.CompoundEventResult; import me.shedaniel.math.Point; @@ -10,12 +10,6 @@ import net.minecraft.client.gui.screens.Screen; class ResourceFocusedStackProvider implements FocusedStackProvider { - private final RecipeModIngredientConverter converter; - - ResourceFocusedStackProvider(final RecipeModIngredientConverter converter) { - this.converter = converter; - } - @Override public CompoundEventResult> provide(final Screen screen, final Point mouse) { if (!(screen instanceof AbstractBaseScreen baseScreen)) { @@ -25,7 +19,9 @@ public CompoundEventResult> provide(final Screen screen, final Poi if (hoveredResource == null) { return CompoundEventResult.pass(); } - final Object converted = converter.convertToIngredient(hoveredResource).orElse(null); + final Object converted = PlatformApi.INSTANCE.getIngredientConverter() + .convertToIngredient(hoveredResource) + .orElse(null); if (converted instanceof EntryStack stack) { return CompoundEventResult.interruptTrue(stack); } From f313b16f6d2e377f95f17724f3e4b8cc65e4fc93 Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Thu, 20 Jun 2024 22:29:04 +0200 Subject: [PATCH 4/5] fix: checkstyle issues --- .../refinedmods/refinedstorage/rei/fabric/ReiClientPlugin.java | 2 -- .../refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java | 2 -- 2 files changed, 4 deletions(-) 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 305baf9..bc4e424 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 @@ -2,8 +2,6 @@ import java.util.function.Supplier; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.ContentIds; diff --git a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java index 74d2cbe..41e5dea 100644 --- a/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java +++ b/refinedstorage-rei-integration-forge/src/main/java/com/refinedmods/refinedstorage/rei/forge/ReiClientPlugin.java @@ -2,8 +2,6 @@ import java.util.function.Supplier; -import com.refinedmods.refinedstorage2.platform.api.PlatformApi; -import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter; import com.refinedmods.refinedstorage2.platform.common.content.BlockColorMap; import com.refinedmods.refinedstorage2.platform.common.content.Blocks; import com.refinedmods.refinedstorage2.platform.common.content.ContentIds; From 3bd825170e2741127ac079c7c4b17f375be8fbbe Mon Sep 17 00:00:00 2001 From: raoulvdberge Date: Thu, 20 Jun 2024 20:29:40 +0000 Subject: [PATCH 5/5] chore: prepare release v0.1.2 --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ebf08a..a8014d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [0.1.2] - 2024-06-20 + ### Fixed - Potential load order issues on Fabric. @@ -28,7 +30,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.1.1...HEAD +[Unreleased]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.1.2...HEAD + +[0.1.2]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.1.0...v0.1.1