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.2.2 #22

Merged
merged 7 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/build.yml@v0.16.4
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.4
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.16.9
with:
release-type: ${{ inputs.release-type }}
version-number-override: ${{ inputs.version-number-override }}
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.4
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.4
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.16.9
secrets: inherit
with:
project-name: 'Refined Storage - REI 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.4
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.4
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.4
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.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.16.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.2.2] - 2024-07-26

### Fixed

- Support for Refined Storage v2.0.0-milestone.4.5.

## [0.2.1] - 2024-07-10

## [0.2.0] - 2024-07-06
Expand Down Expand Up @@ -50,7 +56,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.2.1...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.2...HEAD

[0.2.2]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.1...v0.2.2

[0.2.1]: https://github.com/refinedmods/refinedstorage-rei-integration/compare/v0.2.0...v0.2.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 - REI Integration [![Build Status](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-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 - REI Integration [![Build Status](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/refinedmods/refinedstorage-rei-integration/actions/workflows/build.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=refinedmods_refinedstorage-rei-integration&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=refinedmods_refinedstorage-rei-integration) [![Crowdin](https://badges.crowdin.net/refined-storage-rei-integration/localized.svg)](https://crowdin.com/project/refined-storage-rei-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
# https://linkie.shedaniel.dev/dependencies?loader=neoforge&version=1.21
# https://linkie.shedaniel.dev/dependencies?loader=fabric&version=1.21
architecturyVersion=13.0.3
Expand Down
1 change: 0 additions & 1 deletion refinedstorage-rei-integration-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ refinedarchitect {
base {
archivesName.set("refinedstorage-rei-integration-common")
}

2 changes: 1 addition & 1 deletion refinedstorage-rei-integration-fabric/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ val clothConfigVersion: String by project
val reiVersion: String by project

dependencies {
modApi("com.refinedmods.refinedstorage:refinedstorage-platform-fabric:${refinedstorageVersion}")
modApi("com.refinedmods.refinedstorage:refinedstorage-fabric:${refinedstorageVersion}")
modApi("dev.architectury:architectury-fabric:${architecturyVersion}")
modApi("me.shedaniel.cloth:cloth-config-fabric:${clothConfigVersion}")
modApi("me.shedaniel:RoughlyEnoughItems-fabric:${reiVersion}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.refinedmods.refinedstorage.rei.fabric;

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.awt.Color;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.refinedmods.refinedstorage.rei.fabric;

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 java.util.ArrayList;
import java.util.List;
Expand All @@ -29,7 +29,7 @@ public Stream<BoundsProvider> getDraggableAcceptingBounds(
final var menu = screen.getMenu();
final var value = stack.getStack().getValue();
final List<BoundsProvider> bounds = new ArrayList<>();
PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value).ifPresent(resource -> {
RefinedStorageApi.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)));
Expand All @@ -47,7 +47,7 @@ public DraggedAcceptorResult acceptDraggedStack(
final var screen = context.getScreen();
final var menu = screen.getMenu();
final Object value = stack.getStack().getValue();
return PlatformApi.INSTANCE.getIngredientConverter().convertToResource(value)
return RefinedStorageApi.INSTANCE.getIngredientConverter().convertToResource(value)
.map(resource -> accept(context, menu, screen, resource))
.orElse(DraggedAcceptorResult.PASS);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.refinedmods.refinedstorage.rei.fabric;

import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen;
import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen;

import java.util.Collection;
import java.util.stream.Collectors;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.refinedmods.refinedstorage.rei.fabric;

import com.refinedmods.refinedstorage.platform.api.PlatformApi;
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.architectury.event.CompoundEventResult;
import me.shedaniel.math.Point;
Expand All @@ -16,11 +17,19 @@ public CompoundEventResult<EntryStack<?>> provide(final Screen screen, final Poi
if (!(screen instanceof AbstractGridScreen<?> gridScreen)) {
return CompoundEventResult.pass();
}
final PlatformResourceKey resource = gridScreen.getCurrentResource();
final PlatformGridResource resource = gridScreen.getCurrentGridResource();
if (resource == null) {
return CompoundEventResult.pass();
}
final Object converted = PlatformApi.INSTANCE.getIngredientConverter()
final PlatformResourceKey underlyingResource = resource.getUnderlyingResource();
if (underlyingResource == null) {
return CompoundEventResult.pass();
}
return provide(underlyingResource);
}

private CompoundEventResult<EntryStack<?>> provide(final PlatformResourceKey resource) {
final Object converted = RefinedStorageApi.INSTANCE.getIngredientConverter()
.convertToIngredient(resource)
.orElse(null);
if (converted instanceof EntryStack<?> stack) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.refinedmods.refinedstorage.rei.fabric;

import com.refinedmods.refinedstorage.platform.common.content.ContentIds;
import com.refinedmods.refinedstorage.platform.common.content.Items;
import com.refinedmods.refinedstorage.platform.common.content.Tags;
import com.refinedmods.refinedstorage.platform.common.controller.ControllerBlockItem;
import com.refinedmods.refinedstorage.platform.common.support.AbstractBaseScreen;
import com.refinedmods.refinedstorage.common.content.ContentIds;
import com.refinedmods.refinedstorage.common.content.Items;
import com.refinedmods.refinedstorage.common.content.Tags;
import com.refinedmods.refinedstorage.common.controller.ControllerBlockItem;
import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen;

import java.util.function.Supplier;

Expand All @@ -23,7 +23,7 @@
import net.minecraft.tags.TagKey;
import net.minecraft.world.item.Item;

import static com.refinedmods.refinedstorage.platform.common.util.IdentifierUtil.createTranslation;
import static com.refinedmods.refinedstorage.common.util.IdentifierUtil.createTranslation;
import static com.refinedmods.refinedstorage.rei.common.Common.FULLY_CHARGED_CONTROLLER_GROUP_ID;
import static com.refinedmods.refinedstorage.rei.common.Common.FULLY_CHARGED_CONTROLLER_GROUP_NAME;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.refinedmods.refinedstorage.rei.fabric;

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,9 +1,9 @@
package com.refinedmods.refinedstorage.rei.fabric;

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,16 +1,16 @@
package com.refinedmods.refinedstorage.rei.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.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));
public void onApiAvailable(final RefinedStorageApi api) {
api.addIngredientConverter(new ReiRecipeModIngredientConverter());
api.getGridSynchronizerRegistry().register(SYNCHRONIZER_ID, new ReiGridSynchronizer(false));
api.getGridSynchronizerRegistry().register(TWO_WAY_SYNCHRONIZER_ID, new ReiGridSynchronizer(true));
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.refinedmods.refinedstorage.rei.fabric;

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.architectury.event.CompoundEventResult;
import me.shedaniel.math.Point;
Expand All @@ -20,7 +20,7 @@ public CompoundEventResult<EntryStack<?>> provide(final Screen screen, final Poi
if (hoveredResource == null) {
return CompoundEventResult.pass();
}
final Object converted = PlatformApi.INSTANCE.getIngredientConverter()
final Object converted = RefinedStorageApi.INSTANCE.getIngredientConverter()
.convertToIngredient(hoveredResource)
.orElse(null);
if (converted instanceof EntryStack<?> stack) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@ParametersAreNonnullByDefault
@FieldsAndMethodsAreNonnullByDefault
package com.refinedmods.refinedstorage.rei.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",
"roughlyenoughitems": ">=16",
"java": ">=17"
}
Expand Down
2 changes: 1 addition & 1 deletion refinedstorage-rei-integration-neoforge/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ val clothConfigVersion: String by project
val reiVersion: String by project

dependencies {
api("com.refinedmods.refinedstorage:refinedstorage-platform-neoforge:${refinedstorageVersion}")
api("com.refinedmods.refinedstorage:refinedstorage-neoforge:${refinedstorageVersion}")
api("dev.architectury:architectury-neoforge:${architecturyVersion}")
api("me.shedaniel.cloth:cloth-config-neoforge:${clothConfigVersion}")
api("me.shedaniel:RoughlyEnoughItems-neoforge:${reiVersion}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.refinedmods.refinedstorage.rei.forge;

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.awt.Color;
import java.util.List;
Expand Down
Loading
Loading