From 82eb036023a1188a1ba1386b96fe8f5cb022e1fa Mon Sep 17 00:00:00 2001 From: C-H716 <1536152356@qq.com> Date: Sat, 13 Sep 2025 17:32:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=AE=9E=E4=BD=93?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E5=8D=A1=E9=85=8D=E6=96=B9=EF=BC=9B=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AE=9E=E4=BD=93=E5=8A=A0=E9=80=9F=E5=99=A8=E9=85=8D?= =?UTF-8?q?=E6=96=B9=EF=BC=9B=E6=B7=BB=E5=8A=A0jei=E5=AF=B9=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E5=8A=A0=E9=80=9F=E5=8D=A1=E7=9A=84=E6=B3=A8=E5=86=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../integration/jei/ExtendedAEJeiPlugin.java | 11 ++++++ .../recipes/entity_speed_card_x16.json | 37 +++++++++++++++++++ .../recipes/entity_speed_card_x2.json | 30 +++++++++++++++ .../recipes/entity_speed_card_x4.json | 34 +++++++++++++++++ .../recipes/entity_speed_card_x8.json | 34 +++++++++++++++++ .../recipes/entity_speed_ticker.json | 28 ++++++++++---- 6 files changed, 166 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x16.json create mode 100644 src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x2.json create mode 100644 src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x4.json create mode 100644 src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x8.json diff --git a/src/main/java/com/extendedae_plus/integration/jei/ExtendedAEJeiPlugin.java b/src/main/java/com/extendedae_plus/integration/jei/ExtendedAEJeiPlugin.java index 1294f17..5248037 100644 --- a/src/main/java/com/extendedae_plus/integration/jei/ExtendedAEJeiPlugin.java +++ b/src/main/java/com/extendedae_plus/integration/jei/ExtendedAEJeiPlugin.java @@ -1,8 +1,10 @@ package com.extendedae_plus.integration.jei; import com.extendedae_plus.ExtendedAEPlus; +import com.extendedae_plus.ae.definitions.upgrades.EntitySpeedCardItem; import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; +import mezz.jei.api.registration.ISubtypeRegistration; import mezz.jei.api.runtime.IJeiRuntime; import net.minecraft.resources.ResourceLocation; @@ -19,4 +21,13 @@ public class ExtendedAEJeiPlugin implements IModPlugin { public void onRuntimeAvailable(IJeiRuntime jeiRuntime) { JeiRuntimeProxy.setRuntime(jeiRuntime); } + + @Override + public void registerItemSubtypes(ISubtypeRegistration registration) { + // Register NBT-based subtype interpreter so JEI treats different multipliers as distinct items + registration.registerSubtypeInterpreter( + com.extendedae_plus.init.ModItems.ENTITY_SPEED_CARD.get(), + (stack, context) -> String.valueOf(EntitySpeedCardItem.readMultiplier(stack)) + ); + } } diff --git a/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x16.json b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x16.json new file mode 100644 index 0000000..821378b --- /dev/null +++ b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x16.json @@ -0,0 +1,37 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "SAS", + "QXQ", + "SBS" + ], + "key": { + "S": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "nbt": { + "EAS:mult": 8 + } + }, + "A": { + "item": "minecraft:nether_star" + }, + "B": { + "item": "minecraft:beacon" + }, + "Q": { + "item": "ae2:spatial_cell_component_128" + }, + "X": { + "item": "minecraft:dragon_egg" + } + }, + "result": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "count": 1, + "nbt": { + "EAS:mult": 16 + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x2.json b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x2.json new file mode 100644 index 0000000..6c4466a --- /dev/null +++ b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x2.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "SBS", + "QXQ", + "SBS" + ], + "key": { + "S": { + "item": "ae2:speed_card" + }, + "B": { + "item": "extendedae_plus:64x_crafting_accelerator" + }, + "Q": { + "item": "ae2:spatial_cell_component_2" + }, + "X": { + "item": "ae2:cell_component_256k" + } + }, + "result": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "count": 1, + "nbt": { + "EAS:mult": 2 + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x4.json b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x4.json new file mode 100644 index 0000000..91defa0 --- /dev/null +++ b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x4.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "SBS", + "QXQ", + "SBS" + ], + "key": { + "S": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "nbt": { + "EAS:mult": 2 + } + }, + "B": { + "item": "extendedae_plus:256x_crafting_accelerator" + }, + "Q": { + "item": "ae2:spatial_cell_component_16" + }, + "X": { + "item": "ae2:dense_energy_cell" + } + }, + "result": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "count": 1, + "nbt": { + "EAS:mult": 4 + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x8.json b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x8.json new file mode 100644 index 0000000..73384f0 --- /dev/null +++ b/src/main/resources/data/extendedae_plus/recipes/entity_speed_card_x8.json @@ -0,0 +1,34 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "SBS", + "QXQ", + "SBS" + ], + "key": { + "S": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "nbt": { + "EAS:mult": 4 + } + }, + "B": { + "item": "extendedae_plus:1024x_crafting_accelerator" + }, + "Q": { + "item": "ae2:spatial_cell_component_128" + }, + "X": { + "item": "minecraft:nether_star" + } + }, + "result": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "count": 1, + "nbt": { + "EAS:mult": 8 + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/extendedae_plus/recipes/entity_speed_ticker.json b/src/main/resources/data/extendedae_plus/recipes/entity_speed_ticker.json index df4ee1d..076d943 100644 --- a/src/main/resources/data/extendedae_plus/recipes/entity_speed_ticker.json +++ b/src/main/resources/data/extendedae_plus/recipes/entity_speed_ticker.json @@ -6,16 +6,28 @@ "SIS" ], "key": { - "S": { "item": "ae2:speed_card" }, - "Z": { "item": "ae2:dense_energy_cell" }, - "Q": { "item": "ae2:singularity" }, - "X": { "item": "minecraft:nether_star" }, - "I": { "item": "expatternprovider:ex_io_port" } + "S": { + "type": "forge:partial_nbt", + "item": "extendedae_plus:entity_speed_card", + "nbt": { + "EAS:mult": 2 + } + }, + "Z": { + "item": "ae2:dense_energy_cell" + }, + "Q": { + "item": "ae2:singularity" + }, + "X": { + "item": "minecraft:nether_star" + }, + "I": { + "item": "expatternprovider:ex_io_port" + } }, "result": { "item": "extendedae_plus:entity_speed_ticker", "count": 1 } -} - - +} \ No newline at end of file