Skip to content

Commit

Permalink
Merge pull request #29 from refinedmods/release/0.6.0
Browse files Browse the repository at this point in the history
Release v0.6.0
  • Loading branch information
raoulvdberge authored Dec 8, 2024
2 parents dd6bbad + ad5acae commit 0619639
Show file tree
Hide file tree
Showing 32 changed files with 167 additions and 39 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.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 - 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.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.6.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.5.0] - 2024-10-12

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

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

[0.5.0]: https://github.com/refinedmods/refinedstorage-emi-integration/compare/v0.4.1...v0.5.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
emiVersion=1.1.11+1.21
# Gradle
org.gradle.jvmargs=-Xmx1G
Expand Down
2 changes: 2 additions & 0 deletions refinedstorage-emi-integration-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ base {
}

val refinedstorageVersion: String by project
val refinedstorageQuartzArsenalVersion: String by project
val emiVersion: String by project

dependencies {
api("com.refinedmods.refinedstorage:refinedstorage-common:${refinedstorageVersion}")
compileOnlyApi("dev.emi:emi-xplat-mojmap:${emiVersion}")
compileOnlyApi("com.refinedmods.refinedstorage:refinedstorage-quartz-arsenal-common:${refinedstorageQuartzArsenalVersion}")
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.refinedmods.refinedstorage.api.resource.list.MutableResourceList;
import com.refinedmods.refinedstorage.api.resource.list.MutableResourceListImpl;
import com.refinedmods.refinedstorage.api.resource.list.ResourceList;
import com.refinedmods.refinedstorage.common.api.RefinedStorageApi;
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 com.refinedmods.refinedstorage.common.support.tooltip.HelpClientTooltipComponent;

Expand Down Expand Up @@ -35,13 +35,13 @@
import static com.refinedmods.refinedstorage.emi.common.Common.MOD_ID;
import static java.util.Comparator.comparingLong;

class CraftingGridEmiRecipeHandler extends AbstractEmiRecipeHandler<CraftingGridContainerMenu> {
class CraftingGridEmiRecipeHandler<T extends AbstractCraftingGridContainerMenu> extends AbstractEmiRecipeHandler<T> {
private static final Component CTRL_CLICK_TO_AUTOCRAFT = Component.translatable(
"gui.%s.transfer.ctrl_click_to_autocraft".formatted(MOD_ID)
);

@Override
public EmiPlayerInventory getInventory(final AbstractContainerScreen<CraftingGridContainerMenu> screen) {
public EmiPlayerInventory getInventory(final AbstractContainerScreen<T> screen) {
final ResourceList available = screen.getMenu().getAvailableListForRecipeTransfer();
return new EmiPlayerInventory(available.copyState().stream()
.filter(resourceAmount -> resourceAmount.resource() instanceof ItemResource)
Expand All @@ -58,7 +58,7 @@ public boolean supportsRecipe(final EmiRecipe recipe) {
}

@Override
public boolean canCraft(final EmiRecipe recipe, final EmiCraftContext<CraftingGridContainerMenu> context) {
public boolean canCraft(final EmiRecipe recipe, final EmiCraftContext<T> context) {
return true;
}

Expand Down Expand Up @@ -92,7 +92,7 @@ private static List<ItemResource> getItems(final EmiIngredient ingredient) {
}

@Override
public boolean craft(final EmiRecipe recipe, final EmiCraftContext<CraftingGridContainerMenu> context) {
public boolean craft(final EmiRecipe recipe, final EmiCraftContext<T> context) {
final MutableResourceList available = context.getScreenHandler().getAvailableListForRecipeTransfer();
final List<TransferInput> transferInputs = recipe.getInputs()
.stream()
Expand All @@ -102,7 +102,7 @@ public boolean craft(final EmiRecipe recipe, final EmiCraftContext<CraftingGridC
final TransferType transferType = getTransferType(transferInputs);
if (transferType.canOpenAutocraftingPreview() && Screen.hasControlDown()) {
final List<ResourceAmount> craftingRequests = createCraftingRequests(transferInputs);
RefinedStorageApi.INSTANCE.openAutocraftingPreview(craftingRequests, context.getScreen());
RefinedStorageClientApi.INSTANCE.openAutocraftingPreview(craftingRequests, context.getScreen());
return false;
}
final List<List<ItemResource>> inputs = recipe.getInputs()
Expand All @@ -115,7 +115,7 @@ public boolean craft(final EmiRecipe recipe, final EmiCraftContext<CraftingGridC

@Override
public void render(final EmiRecipe recipe,
final EmiCraftContext<CraftingGridContainerMenu> craftContext,
final EmiCraftContext<T> craftContext,
final List<Widget> widgets,
final GuiGraphics draw) {
final EmiDrawContext context = EmiDrawContext.wrap(draw);
Expand All @@ -141,7 +141,7 @@ public void render(final EmiRecipe recipe,

@Override
public List<ClientTooltipComponent> getTooltip(final EmiRecipe recipe,
final EmiCraftContext<CraftingGridContainerMenu> context) {
final EmiCraftContext<T> context) {
final MutableResourceList available = context.getScreenHandler().getAvailableListForRecipeTransfer();
final List<TransferInput> transferInputs = recipe.getInputs()
.stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.refinedmods.refinedstorage.api.resource.ResourceAmount;
import com.refinedmods.refinedstorage.api.resource.ResourceKey;
import com.refinedmods.refinedstorage.common.api.RefinedStorageApi;
import com.refinedmods.refinedstorage.common.autocrafting.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.autocrafting.patterngrid.PatternGridContainerMenu;
import com.refinedmods.refinedstorage.common.support.resource.ItemResource;

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

import com.refinedmods.refinedstorage.quartzarsenal.common.Menus;

import dev.emi.emi.api.EmiRegistry;

public final class QuartzArsenalIntegration {
private QuartzArsenalIntegration() {
}

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

public static void load(final EmiRegistry registration) {
registration.addRecipeHandler(
Menus.INSTANCE.getWirelessCraftingGrid(),
new CraftingGridEmiRecipeHandler<>()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ public void register(final EmiRegistry registry) {
registry.addGenericStackProvider(new ResourceEmiStackProvider());
registry.addGenericDragDropHandler(new ResourceEmiDragDropHandler());
registry.addGenericDragDropHandler(new FilterEmiDragDropHandler());
registry.addRecipeHandler(Menus.INSTANCE.getCraftingGrid(), new CraftingGridEmiRecipeHandler());
registry.addRecipeHandler(Menus.INSTANCE.getCraftingGrid(), new CraftingGridEmiRecipeHandler<>());
if (QuartzArsenalIntegration.isLoaded()) {
QuartzArsenalIntegration.load(registry);
}
registry.addRecipeHandler(Menus.INSTANCE.getPatternGrid(), new PatternGridEmiRecipeHandler());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
"gui.refinedstorage_emi_integration.grid.synchronizer": "EMI",
"gui.refinedstorage_emi_integration.grid.synchronizer.help": "Sync the search box text to the EMI filter.",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way": "EMI two-way",
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text."
"gui.refinedstorage_emi_integration.grid.synchronizer.two_way.help": "Sync the search box text to the EMI filter, and the EMI filter to the search box text.",
"alias.emi.refinedstorage1_disk_manipulator": "Disk Manipulator",
"gui.refinedstorage_emi_integration.transfer.missing_but_all_autocraftable": "Missing items, all are autocraftable",
"gui.refinedstorage_emi_integration.transfer.missing_but_some_autocraftable": "Missing items, some are autocraftable",
"gui.refinedstorage_emi_integration.transfer.ctrl_click_to_autocraft": "CTRL + click to autocraft",
"gui.refinedstorage_emi_integration.transfer.all_autocraftable": "All are autocraftable",
"gui.refinedstorage_emi_integration.transfer.some_autocraftable": "Some are autocraftable"
}
Loading

0 comments on commit 0619639

Please sign in to comment.