Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.3.2 #18

Merged
merged 6 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down
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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].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/[email protected].4
uses: refinedmods/refinedarchitect/.github/workflows/[email protected].9
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
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 All @@ -14,6 +14,7 @@
import net.minecraft.world.level.material.Fluid;

class EmiRecipeModIngredientConverter implements RecipeModIngredientConverter {
@SuppressWarnings("UnstableApiUsage")
@Override
public Optional<PlatformResourceKey> convertToResource(final Object ingredient) {
if (ingredient instanceof FluidEmiStack fluid) {
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.emi.common;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
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
@@ -1,4 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.emi.fabric;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
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
@@ -1,4 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.emi.forge;

import com.refinedmods.refinedstorage.api.core.FieldsAndMethodsAreNonnullByDefault;

import javax.annotation.ParametersAreNonnullByDefault;
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
Loading
Loading