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