From 577aac56550a62059c4dc48304e5e47be32246d5 Mon Sep 17 00:00:00 2001 From: IJustWantANamePlease <69347951+IJustWantANamePlease@users.noreply.github.com> Date: Sat, 2 Dec 2023 07:45:54 +0800 Subject: [PATCH 1/2] Update Chinese Simplified (#355) Update zh_cn to 1.0.25 --- .../main/resources/assets/emi/lang/zh_cn.json | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/xplat/src/main/resources/assets/emi/lang/zh_cn.json b/xplat/src/main/resources/assets/emi/lang/zh_cn.json index b24a5097..baf01f26 100644 --- a/xplat/src/main/resources/assets/emi/lang/zh_cn.json +++ b/xplat/src/main/resources/assets/emi/lang/zh_cn.json @@ -24,6 +24,8 @@ "config.emi.tooltip.binds.view_tree": "查看配方树界面", "key.emi.back": "返回", "config.emi.tooltip.binds.back": "回到上一个打开的EMI界面", + "key.emi.forward": "前进", + "config.emi.tooltip.binds.forward": "在返回后重新打开被关闭的界面\n(就像浏览器的前进键)", "key.emi.craft_one": "填充单次配方", "config.emi.tooltip.binds.craft_one": "在当前工作方块中填充单次合成配方", "key.emi.craft_all": "填充最大次配方", @@ -51,6 +53,9 @@ "key.emi.hide_stack_by_id": "隐藏物品ID", "key.emi.tooltip.hide_stack_by_id": "仅在编辑模式下生效:\n在EMI中隐藏所有与 光标选中物品 有相同ID的物品", + "emi.index_source.creative": "创造模式物品栏", + "emi.index_source.registered": "物品注册顺序", + "emi.index_source.creative_plus_registered": "创造物品栏+注册顺序", "emi.help_level.verbose": "啰里吧嗦", "emi.help_level.normal": "普通", "emi.help_level.none": "隐藏", @@ -113,6 +118,8 @@ "config.emi.tooltip.general.cheat_mode": "允许开启作弊时直接获得物品", "config.emi.general.help_level": "引导等级", "config.emi.tooltip.general.help_level": "EMI界面中物品提示框\n和帮助信息的数量", + "config.emi.general.index_source": "物品索引来源", + "config.emi.tooltip.general.index_source": "EMI应该以什么的顺序排序物品索引", "config.emi.general.search_tooltip_by_default": "默认搜索包含物品提示", "config.emi.tooltip.general.search_tooltip_by_default": "可以直接搜索物品提示框中的内容,\n而无需使用“#”前缀", "config.emi.general.search_mod_name_by_default": "默认搜索包含模组名", @@ -240,10 +247,12 @@ "config.emi.presets.binds": "热键预设", "config.emi.presets.restore": "恢复与重置", + "config.emi.presets.productive": "高效工作", + "config.emi.tooltip.presets.productive": "右侧索引、左侧可合成、左上角收藏夹。\n完美利用EMI提供的功能!", + "config.emi.presets.recipe_book_plus": "配方书增强", + "config.emi.tooltip.presets.recipe_book_plus": "将左侧边栏缩小用作配方书(显示可合成物品),\n也可切换成收藏夹", "config.emi.presets.empty_search_craftable": "未搜索时显示可合成物品", "config.emi.tooltip.presets.empty_search_craftable": "右侧边栏使用“物品索引”与“可合成物品”:\n不搜索时显示可合成物品\n搜索时显示物品索引", - "config.emi.presets.recipe_book_plus": "配方书+", - "config.emi.tooltip.presets.recipe_book_plus": "将左侧边栏缩小用作配方书(显示可合成物品),\n也可切换成收藏夹", "config.emi.presets.author_binds": "作者用的热键", "config.emi.tooltip.presets.author_binds": "试试作者用的热键组合,说不定对你胃口呢?", @@ -731,6 +740,19 @@ "tag.item.c.water_buckets": "水桶", "tag.item.c.wrenches": "扳手", + "tag.item.c.budding_blocks": "生芽方块", + "tag.item.c.buds": "芽", + "tag.item.c.clusters": "群落", + "tag.item.c.entity_water_buckets": "实体水桶", + "tag.item.c.raw_ores": "粗矿", + "tag.item.c.red_sandstone_blocks": "红砂岩方块", + "tag.item.c.sandstone_blocks": "砂岩方块", + "tag.item.c.uncolored_sandstone_blocks": "未染色的砂岩方块", + "tag.item.c.uncolored_sandstone_slabs": "未染色的砂岩台阶", + "tag.item.c.uncolored_sandstone_stairs": "未染色的砂岩楼梯", + "tag.item.c.villager_job_sites": "村民工作方块", + "tag.item.c.wooden_barrels": "木桶", + "tag.item.c.armors": "盔甲", "tag.item.c.armors.boots": "靴子", "tag.item.c.armors.chestplates": "胸甲", From 219e6cdc552ed1f5d87c7fae2f549045a83fa7b5 Mon Sep 17 00:00:00 2001 From: emilyploszaj Date: Fri, 1 Dec 2023 22:34:32 -0600 Subject: [PATCH 2/2] 1.0.26 --- .github/workflows/build.yml | 7 +++++-- .github/workflows/release.yml | 12 +++++++++++- CHANGELOG.md | 7 ++----- gradle.properties | 2 +- .../java/dev/emi/emi/jemi/JemiRecipeHandler.java | 16 +++++++++------- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d81dc796..aaff95fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,11 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle-wrapper.properties') }} restore-keys: ${{ runner.os }}-gradle - - name: Build - run: ./gradlew build + - name: Build Fabric + run: ./gradlew :fabric:build + + - name: Build Forge + run: ./gradlew :forge:build - name: Upload Artifacts uses: actions/upload-artifact@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7787c6cc..24898b3f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,12 +39,22 @@ jobs: id: composite_version run: echo "composite_version=${{ steps.mod_version.outputs.mod_version }}+${{ steps.minecraft_version.outputs.minecraft_version }}" >> $GITHUB_OUTPUT + - name: Build Fabric + env: + RELEASE: true + run: ./gradlew :fabric:build + + - name: Build Forge + env: + RELEASE: true + run: ./gradlew :forge:build + - name: Publish env: MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }} RELEASE: true - run: ./gradlew build publish modrinth curseforge -PmavenUrl="${{ secrets.MAVEN_URL }}" -PmavenUsername="${{ secrets.MAVEN_USERNAME }}" -PmavenPassword="${{ secrets.MAVEN_PASSWORD }}" + run: ./gradlew publish modrinth curseforge -PmavenUrl="${{ secrets.MAVEN_URL }}" -PmavenUsername="${{ secrets.MAVEN_USERNAME }}" -PmavenPassword="${{ secrets.MAVEN_PASSWORD }}" - name: Create Release id: create_release diff --git a/CHANGELOG.md b/CHANGELOG.md index 5edd35f7..1e75a5e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,5 @@ ### Additions -* Added option to use all registered items instead of creative tabs to source the index. -* Added tab scrolling on hover #308 -* Added better support for JEI slot highlighting +* Updated Chinese translation ### Fixes -* Fixed ingredient serializer errors #354 -* Fixed #346 \ No newline at end of file +* Fixed highlighting for mods like Refined Storage \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 45b9ed29..9d951088 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.20.2 enabled_platforms=fabric,forge archives_base_name=emi -mod_version=1.0.25 +mod_version=1.0.26 maven_group=dev.emi architectury_version=4.9.83 diff --git a/xplat/src/main/java/dev/emi/emi/jemi/JemiRecipeHandler.java b/xplat/src/main/java/dev/emi/emi/jemi/JemiRecipeHandler.java index 603c826a..b41d63dd 100644 --- a/xplat/src/main/java/dev/emi/emi/jemi/JemiRecipeHandler.java +++ b/xplat/src/main/java/dev/emi/emi/jemi/JemiRecipeHandler.java @@ -69,13 +69,13 @@ public boolean supportsRecipe(EmiRecipe recipe) { @Override public boolean canCraft(EmiRecipe recipe, EmiCraftContext context) { - IRecipeTransferError err = jeiCraft(recipe, context, false); + IRecipeTransferError err = jeiCraft(recipe, context, false, null); return err == null || err.getType().allowsTransfer; } @Override public boolean craft(EmiRecipe recipe, EmiCraftContext context) { - IRecipeTransferError err = jeiCraft(recipe, context, true); + IRecipeTransferError err = jeiCraft(recipe, context, true, null); if (err == null || err.getType().allowsTransfer) { MinecraftClient.getInstance().setScreen(context.getScreen()); } @@ -85,7 +85,9 @@ public boolean craft(EmiRecipe recipe, EmiCraftContext context) { @Override public void render(EmiRecipe recipe, EmiCraftContext context, List widgets, DrawContext raw) { EmiDrawContext draw = EmiDrawContext.wrap(raw); - IRecipeTransferError err = jeiCraft(recipe, context, false); + R rawRecipe = getRawRecipe(recipe); + JemiRecipeSlotsView view = createSlotsView(recipe, rawRecipe, widgets); + IRecipeTransferError err = jeiCraft(recipe, context, false, view); if (err != null) { if (err.getType() == IRecipeTransferError.Type.COSMETIC) { for (Widget widget : widgets) { @@ -95,8 +97,6 @@ public void render(EmiRecipe recipe, EmiCraftContext context, List wi } } } - R rawRecipe = getRawRecipe(recipe); - JemiRecipeSlotsView view = createSlotsView(recipe, rawRecipe, widgets); if (view != null) { view.getSlotViews().forEach(v -> { if (v instanceof JemiRecipeSlot jrs) { @@ -118,12 +118,14 @@ public void render(EmiRecipe recipe, EmiCraftContext context, List wi } @SuppressWarnings("unchecked") - private IRecipeTransferError jeiCraft(EmiRecipe recipe, EmiCraftContext context, boolean craft) { + private IRecipeTransferError jeiCraft(EmiRecipe recipe, EmiCraftContext context, boolean craft, JemiRecipeSlotsView view) { try { MinecraftClient client = MinecraftClient.getInstance(); R rawRecipe = getRawRecipe(recipe); - JemiRecipeSlotsView view = createSlotsView(recipe, rawRecipe, List.of()); + if (view == null) { + view = createSlotsView(recipe, rawRecipe, List.of()); + } if (view == null) { return () -> IRecipeTransferError.Type.INTERNAL;