Skip to content

Commit

Permalink
chore: upgrade refined storage
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Jul 26, 2024
1 parent f96becd commit 5e9b5df
Show file tree
Hide file tree
Showing 26 changed files with 56 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [ opened, synchronize, reopened ]
jobs:
build:
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.16.9
with:
mutation-testing: false
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
type: string
jobs:
draft:
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-for-unsupported-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ labeled, unlabeled, reopened ]
jobs:
unsupported-labeler:
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.16.9
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- closed
jobs:
publish-release:
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.9
secrets: inherit
with:
project-name: 'Refined Storage - EMI Integration'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resolved-issue-locking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
- cron: '0 0 * * *'
jobs:
lock:
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.16.9
2 changes: 1 addition & 1 deletion .github/workflows/validate-branch-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate branch name
on: [ pull_request ]
jobs:
validate-branch-name:
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.16.9
2 changes: 1 addition & 1 deletion .github/workflows/validate-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ on:
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
jobs:
validate-changelog:
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.16.9
2 changes: 1 addition & 1 deletion .github/workflows/validate-commit-messages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ name: Validate commit messages
on: [ pull_request ]
jobs:
validate-commit-messages:
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.7
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.9
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.1] - 2024-07-10

## [0.3.0] - 2024-07-06
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
emiVersion=1.1.10+1.21
# Gradle
org.gradle.jvmargs=-Xmx1G
2 changes: 1 addition & 1 deletion refinedstorage-emi-integration-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -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)
);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
Expand Down Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion refinedstorage-emi-integration-fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
Original file line number Diff line number Diff line change
@@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion refinedstorage-emi-integration-neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -18,6 +18,6 @@ public ModInitializer(final IEventBus eventBus) {

@SubscribeEvent
public static void onCommonSetup(final FMLCommonSetupEvent e) {
init(PlatformApi.INSTANCE);
init(RefinedStorageApi.INSTANCE);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5e9b5df

Please sign in to comment.