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

feat: port to minecraft 1.21 #11

Merged
merged 1 commit into from
Jul 6, 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ body:
description: |
If your Minecraft version isn't listed here, it means that it's no longer supported. In that case, don't create an issue.
options:
- Minecraft 1.20.4
- Minecraft 1.21
validations:
required: true
- type: input
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/build.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/draft-release.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/issue-for-unsupported-version.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/publish-release.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/resolved-issue-locking.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-branch-name.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-changelog.yml@v0.15.2
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.13.4
uses: refinedmods/refinedarchitect/.github/workflows/validate-commit-messages.yml@v0.15.2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ out/
/bin/
logs/
.cache/
run/
24 changes: 16 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,39 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- Search alias for the old name of the Disk Interface.

### Fixed

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

## [0.2.1] - 2024-06-28

### Fixed

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

## [0.2.0] - 2024-06-20

### Added

- Recipe defaults.
- Recipe defaults.

### Fixed

- Recipe transfer not working.
- Recipe transfer not working.

## [0.1.0] - 2024-06-20

### Added

- Support for EMI exclusion zones.
- Support for EMI ghost ingredient dragging.
- Support for using the R/U keys on Grid slots and filtering slots.
- Recipe transfer integration for the Crafting Grid.
- Grid / EMI search box synchronization options.
- Support for EMI exclusion zones.
- Support for EMI ghost ingredient dragging.
- Support for using the R/U keys on Grid slots and filtering slots.
- Recipe transfer integration for the Crafting Grid.
- Grid / EMI search box synchronization options.

[Unreleased]: https://github.com/refinedmods/refinedstorage-emi-integration/compare/v0.2.1...HEAD

Expand Down
4 changes: 2 additions & 2 deletions config/intellij-code-style.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<code_scheme name="Refined Mods" version="173">
<JavaCodeStyleSettings>
<option name="GENERATE_FINAL_LOCALS" value="true" />
<option name="GENERATE_FINAL_PARAMETERS" value="true" />
<option name="GENERATE_FINAL_LOCALS" value="true"/>
<option name="GENERATE_FINAL_PARAMETERS" value="true"/>
<option name="SPACE_INSIDE_ONE_LINE_ENUM_BRACES" value="true"/>
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999"/>
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999"/>
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
refinedstorageVersion=2.0.0-milestone.3.14
emiVersion=1.1.7+1.20.4
refinedstorageVersion=2.0.0-milestone.4.2
emiVersion=1.1.10+1.21
# Gradle
org.gradle.jvmargs=-Xmx1G
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion refinedstorage-emi-integration-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repositories {
commonProject()

dependencies {
api "com.refinedmods.refinedstorage2:refinedstorage2-platform-common:${refinedstorageVersion}"
api "com.refinedmods.refinedstorage:refinedstorage-platform-common:${refinedstorageVersion}"
compileOnlyApi "dev.emi:emi-xplat-mojmap:${emiVersion}"
}

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

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage.platform.api.PlatformApi;

import net.minecraft.resources.ResourceLocation;

public final class Common {
Expand All @@ -12,11 +13,11 @@ private Common() {
public static void init(final PlatformApi platformApi) {
platformApi.addIngredientConverter(new EmiRecipeModIngredientConverter());
platformApi.getGridSynchronizerRegistry().register(
new ResourceLocation(MOD_ID, "emi"),
ResourceLocation.fromNamespaceAndPath(MOD_ID, "emi"),
new EmiGridSynchronizer(false)
);
platformApi.getGridSynchronizerRegistry().register(
new ResourceLocation(MOD_ID, "emi_two_way"),
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,12 @@
package com.refinedmods.refinedstorage.emi.common;

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey;
import com.refinedmods.refinedstorage2.platform.common.Platform;
import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen;
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.AbstractResourceContainerMenu;
import com.refinedmods.refinedstorage2.platform.common.support.containermenu.ResourceSlot;
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 dev.emi.emi.api.EmiDragDropHandler;
import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.runtime.EmiDrawContext;
Expand Down Expand Up @@ -52,10 +53,7 @@ private boolean dropStack(final PlatformResourceKey resource,
if (x < slotX || y < slotY || x > slotX + 16 || y > slotY + 16) {
return false;
}
Platform.INSTANCE.getClientToServerCommunications().sendResourceFilterSlotChange(
resource,
slot.index
);
C2SPackets.sendResourceFilterSlotChange(resource, slot.index);
return true;
}

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

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

import java.util.List;
import java.util.function.Consumer;

import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen;
import dev.emi.emi.api.EmiExclusionArea;
import dev.emi.emi.api.widget.Bounds;
import net.minecraft.client.gui.screens.Screen;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.refinedmods.refinedstorage.emi.common;

import com.refinedmods.refinedstorage.platform.common.grid.AbstractGridSynchronizer;

import javax.annotation.Nullable;

import com.refinedmods.refinedstorage2.platform.common.grid.AbstractGridSynchronizer;
import dev.emi.emi.api.EmiApi;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
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 java.util.List;
import java.util.stream.Collectors;

import com.mojang.blaze3d.systems.RenderSystem;
import com.refinedmods.refinedstorage2.api.resource.list.ResourceList;
import com.refinedmods.refinedstorage2.platform.common.grid.CraftingGridContainerMenu;
import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResource;
import dev.emi.emi.api.recipe.EmiCraftingRecipe;
import dev.emi.emi.api.recipe.EmiPlayerInventory;
import dev.emi.emi.api.recipe.EmiRecipe;
Expand All @@ -30,7 +31,7 @@ public EmiPlayerInventory getInventory(final AbstractContainerScreen<CraftingGri
.filter(resourceAmount -> resourceAmount.getResource() instanceof ItemResource)
.map(resourceAmount -> EmiStack.of(
((ItemResource) resourceAmount.getResource()).item(),
((ItemResource) resourceAmount.getResource()).tag(),
((ItemResource) resourceAmount.getResource()).components(),
resourceAmount.getAmount()
)).toList());
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
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 java.util.Optional;

import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey;
import com.refinedmods.refinedstorage2.platform.api.support.resource.RecipeModIngredientConverter;
import com.refinedmods.refinedstorage2.platform.common.support.resource.FluidResource;
import com.refinedmods.refinedstorage2.platform.common.support.resource.ItemResource;
import dev.emi.emi.api.stack.EmiStack;
import dev.emi.emi.api.stack.FluidEmiStack;
import dev.emi.emi.api.stack.ItemEmiStack;
Expand All @@ -16,10 +17,10 @@ class EmiRecipeModIngredientConverter implements RecipeModIngredientConverter {
@Override
public Optional<PlatformResourceKey> convertToResource(final Object ingredient) {
if (ingredient instanceof FluidEmiStack fluid) {
return Optional.of(new FluidResource((Fluid) fluid.getKey(), fluid.getNbt()));
return Optional.of(new FluidResource((Fluid) fluid.getKey(), fluid.getComponentChanges()));
}
if (ingredient instanceof ItemEmiStack item) {
return Optional.of(new ItemResource((Item) item.getKey(), item.getNbt()));
return Optional.of(new ItemResource((Item) item.getKey(), item.getComponentChanges()));
}
return Optional.empty();
}
Expand All @@ -30,7 +31,7 @@ public Optional<Object> convertToIngredient(final PlatformResourceKey resource)
return Optional.of(EmiStack.of(itemResource.toItemStack()));
}
if (resource instanceof FluidResource fluidResource) {
return Optional.of(EmiStack.of(fluidResource.fluid(), fluidResource.tag()));
return Optional.of(EmiStack.of(fluidResource.fluid(), fluidResource.components()));
}
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.refinedmods.refinedstorage.emi.common;

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage2.platform.api.grid.view.PlatformGridResource;
import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey;
import com.refinedmods.refinedstorage2.platform.common.grid.screen.AbstractGridScreen;
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 dev.emi.emi.api.EmiStackProvider;
import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStackInteraction;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.refinedmods.refinedstorage.emi.common;

import com.refinedmods.refinedstorage2.platform.common.content.Menus;
import com.refinedmods.refinedstorage.platform.common.content.Menus;

import dev.emi.emi.api.EmiEntrypoint;
import dev.emi.emi.api.EmiPlugin;
import dev.emi.emi.api.EmiRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.refinedmods.refinedstorage.emi.common;

import com.refinedmods.refinedstorage2.platform.api.PlatformApi;
import com.refinedmods.refinedstorage2.platform.api.support.resource.PlatformResourceKey;
import com.refinedmods.refinedstorage2.platform.common.support.AbstractBaseScreen;
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 dev.emi.emi.api.EmiStackProvider;
import dev.emi.emi.api.stack.EmiIngredient;
import dev.emi.emi.api.stack.EmiStackInteraction;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"aliases": [
{
"stacks": "item:refinedstorage:disk_interface",
"text": "alias.emi.refinedstorage1_disk_manipulator"
}
]
}
Loading
Loading