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.7.0 #32

Merged
merged 17 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.20.0
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.20.0
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.20.0
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.20.0
secrets: inherit
with:
project-name: 'Refined Storage - JEI 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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.20.0
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.20.0
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.20.0
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.19.1
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.20.0
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.7.0] - 2024-12-08

### Fixed

- Support for Refined Storage v2.0.0-milestone.4.11.
- Recipe transfer not working in the Wireless Crafting Grid.

## [0.6.0] - 2024-10-12

### Added
Expand Down Expand Up @@ -78,7 +85,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.6.0...HEAD
[Unreleased]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.7.0...HEAD

[0.7.0]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.6.0...v0.7.0

[0.6.0]: https://github.com/refinedmods/refinedstorage-jei-integration/compare/v0.5.0...v0.6.0

Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
refinedarchitectVersion=0.19.1
refinedstorageVersion=2.0.0-milestone.4.8
refinedarchitectVersion=0.20.0
refinedstorageVersion=2.0.0-milestone.4.11
refinedstorageQuartzArsenalVersion=0.1.1
jeiVersion=19.20.0.241
minecraftVersion=1.21.1
# Gradle
Expand Down
2 changes: 2 additions & 0 deletions refinedstorage-jei-integration-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ base {
}

val refinedstorageVersion: String by project
val refinedstorageQuartzArsenalVersion: String by project
val jeiVersion: String by project
val minecraftVersion: String by project

dependencies {
api("com.refinedmods.refinedstorage:refinedstorage-common:${refinedstorageVersion}")
api("mezz.jei:jei-${minecraftVersion}-common-api:${jeiVersion}")
api("mezz.jei:jei-${minecraftVersion}-common:${jeiVersion}")
compileOnlyApi("com.refinedmods.refinedstorage:refinedstorage-quartz-arsenal-common:${refinedstorageQuartzArsenalVersion}")
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.refinedmods.refinedstorage.api.grid.view.GridView;
import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu;

import java.util.List;
import javax.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.api.resource.list.MutableResourceList;
import com.refinedmods.refinedstorage.api.resource.list.MutableResourceListImpl;
import com.refinedmods.refinedstorage.common.api.RefinedStorageApi;
import com.refinedmods.refinedstorage.common.content.Menus;
import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu;
import com.refinedmods.refinedstorage.common.api.RefinedStorageClientApi;
import com.refinedmods.refinedstorage.common.grid.AbstractCraftingGridContainerMenu;
import com.refinedmods.refinedstorage.common.support.resource.ItemResource;

import java.util.List;
Expand All @@ -32,16 +31,22 @@

import static java.util.Comparator.comparingLong;

class CraftingGridRecipeTransferHandler implements
IRecipeTransferHandler<CraftingGridContainerMenu, RecipeHolder<CraftingRecipe>> {
class CraftingGridRecipeTransferHandler<T extends AbstractCraftingGridContainerMenu> implements
IRecipeTransferHandler<T, RecipeHolder<CraftingRecipe>> {
private final Class<T> clazz;

CraftingGridRecipeTransferHandler(final Class<T> clazz) {
this.clazz = clazz;
}

@Override
public Class<? extends CraftingGridContainerMenu> getContainerClass() {
return CraftingGridContainerMenu.class;
public Class<T> getContainerClass() {
return clazz;
}

@Override
public Optional<MenuType<CraftingGridContainerMenu>> getMenuType() {
return Optional.of(Menus.INSTANCE.getCraftingGrid());
public Optional<MenuType<T>> getMenuType() {
return Optional.empty();
}

@Override
Expand All @@ -51,7 +56,7 @@ public RecipeType<RecipeHolder<CraftingRecipe>> getRecipeType() {

@Override
@Nullable
public IRecipeTransferError transferRecipe(final CraftingGridContainerMenu containerMenu,
public IRecipeTransferError transferRecipe(final T containerMenu,
final RecipeHolder<CraftingRecipe> recipe,
final IRecipeSlotsView recipeSlots,
final Player player,
Expand All @@ -78,7 +83,7 @@ private void openAutocraftingPreview(final List<TransferInput> transferInputs) {
? recipesGui.getParentScreen().orElse(null)
: null;
final List<ResourceAmount> craftingRequests = createCraftingRequests(transferInputs);
RefinedStorageApi.INSTANCE.openAutocraftingPreview(craftingRequests, parentScreen);
RefinedStorageClientApi.INSTANCE.openAutocraftingPreview(craftingRequests, parentScreen);
}

private TransferType getTransferType(final List<TransferInput> transferInputs) {
Expand All @@ -96,7 +101,7 @@ private TransferType getTransferType(final List<TransferInput> transferInputs) {
return TransferType.MISSING;
}

private void doTransfer(final IRecipeSlotsView recipeSlots, final CraftingGridContainerMenu containerMenu) {
private void doTransfer(final IRecipeSlotsView recipeSlots, final AbstractCraftingGridContainerMenu containerMenu) {
final List<List<ItemResource>> inputs = SlotUtil.getItems(recipeSlots, RecipeIngredientRole.INPUT);
containerMenu.transferRecipe(inputs);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.refinedmods.refinedstorage.jei.common;

import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.content.Menus;
import com.refinedmods.refinedstorage.common.support.resource.ItemResource;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.refinedmods.refinedstorage.jei.common;

import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.content.Menus;

import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.refinedmods.refinedstorage.jei.common;

import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.content.Menus;
import com.refinedmods.refinedstorage.common.support.resource.ItemResource;

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

import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.content.Menus;

import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.refinedmods.refinedstorage.jei.common;

import com.refinedmods.refinedstorage.quartzarsenal.common.wirelesscraftinggrid.WirelessCraftingGridContainerMenu;

import mezz.jei.api.constants.RecipeTypes;
import mezz.jei.api.registration.IRecipeTransferRegistration;

public final class QuartzArsenalIntegration {
private QuartzArsenalIntegration() {
}

public static boolean isLoaded() {
try {
Class.forName(
"com.refinedmods.refinedstorage.quartzarsenal.common.wirelesscraftinggrid"
+ ".WirelessCraftingGridContainerMenu"
);
return true;
} catch (final ClassNotFoundException e) {
return false;
}
}

public static void load(final IRecipeTransferRegistration registration) {
registration.addRecipeTransferHandler(new CraftingGridRecipeTransferHandler<>(
WirelessCraftingGridContainerMenu.class
), RecipeTypes.CRAFTING);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.refinedmods.refinedstorage.jei.common;

import com.refinedmods.refinedstorage.common.content.Items;
import com.refinedmods.refinedstorage.common.grid.CraftingGridContainerMenu;
import com.refinedmods.refinedstorage.common.grid.screen.AbstractGridScreen;
import com.refinedmods.refinedstorage.common.support.AbstractBaseScreen;

Expand Down Expand Up @@ -42,7 +43,12 @@ public void registerIngredientAliases(final IIngredientAliasRegistration registr

@Override
public void registerRecipeTransferHandlers(final IRecipeTransferRegistration registration) {
registration.addRecipeTransferHandler(new CraftingGridRecipeTransferHandler(), RecipeTypes.CRAFTING);
registration.addRecipeTransferHandler(new CraftingGridRecipeTransferHandler<>(
CraftingGridContainerMenu.class
), RecipeTypes.CRAFTING);
if (QuartzArsenalIntegration.isLoaded()) {
QuartzArsenalIntegration.load(registration);
}
registration.addRecipeTransferHandler(new PatternGridCraftingRecipeTransferHandler(), RecipeTypes.CRAFTING);
registration.addRecipeTransferHandler(
new PatternGridStonecutterRecipeTransferHandler(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_jei_integration.grid.synchronizer": "JEI",
"gui.refinedstorage_jei_integration.grid.synchronizer.help": "Synchronisieren Sie das Suchfeld Text mit dem JEI Filter.",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way": "JEI beidseitig",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Synchronisieren Sie das Suchfeld Text mit dem JEI Filter und den JEI Filter mit dem Suchfeld Text."
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Synchronisieren Sie das Suchfeld Text mit dem JEI Filter und den JEI Filter mit dem Suchfeld Text.",
"gui.refinedstorage_jei_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_jei_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_jei_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_jei_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_jei_integration.transfer.some_autocraftable": "Some are autocraftable",
"alias.refinedstorage_jei_integration.refinedstorage1_disk_manipulator": "Disk Manipulator"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_jei_integration.grid.synchronizer": "JEI",
"gui.refinedstorage_jei_integration.grid.synchronizer.help": "Sync the search box text to the JEI filter.",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way": "JEI two-way",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text."
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text.",
"gui.refinedstorage_jei_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_jei_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_jei_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_jei_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_jei_integration.transfer.some_autocraftable": "Some are autocraftable",
"alias.refinedstorage_jei_integration.refinedstorage1_disk_manipulator": "Disk Manipulator"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_jei_integration.grid.synchronizer": "JEI",
"gui.refinedstorage_jei_integration.grid.synchronizer.help": "Sync the search box text to the JEI filter.",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way": "JEI two-way",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text."
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text.",
"gui.refinedstorage_jei_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_jei_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_jei_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_jei_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_jei_integration.transfer.some_autocraftable": "Some are autocraftable",
"alias.refinedstorage_jei_integration.refinedstorage1_disk_manipulator": "Disk Manipulator"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_jei_integration.grid.synchronizer": "JEI",
"gui.refinedstorage_jei_integration.grid.synchronizer.help": "Sync the search box text to the JEI filter.",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way": "JEI two-way",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text."
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text.",
"gui.refinedstorage_jei_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_jei_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_jei_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_jei_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_jei_integration.transfer.some_autocraftable": "Some are autocraftable",
"alias.refinedstorage_jei_integration.refinedstorage1_disk_manipulator": "Disk Manipulator"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_jei_integration.grid.synchronizer": "JEI",
"gui.refinedstorage_jei_integration.grid.synchronizer.help": "Sync the search box text to the JEI filter.",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way": "JEI two-way",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text."
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text.",
"gui.refinedstorage_jei_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_jei_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_jei_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_jei_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_jei_integration.transfer.some_autocraftable": "Some are autocraftable",
"alias.refinedstorage_jei_integration.refinedstorage1_disk_manipulator": "Disk Manipulator"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_jei_integration.grid.synchronizer": "JEI",
"gui.refinedstorage_jei_integration.grid.synchronizer.help": "Sync the search box text to the JEI filter.",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way": "JEI two-way",
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text."
"gui.refinedstorage_jei_integration.grid.synchronizer.two_way.help": "Sync the search box text to the JEI filter, and the JEI filter to the search box text.",
"gui.refinedstorage_jei_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_jei_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_jei_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_jei_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_jei_integration.transfer.some_autocraftable": "Some are autocraftable",
"alias.refinedstorage_jei_integration.refinedstorage1_disk_manipulator": "Disk Manipulator"
}
Loading
Loading