From 06e9ebe85281c31e944c5d5183585d8682066321 Mon Sep 17 00:00:00 2001 From: DancingSnow <1121149616@qq.com> Date: Fri, 13 Dec 2024 20:01:41 +0800 Subject: [PATCH 1/3] update ae2 dependency to 19.0.26, fix crash with newest ae2 version --- .gitignore | 1 + gradle/scripts/dependencies.gradle | 8 ++--- .../quantum_fluid_storage_cell.json | 14 ++++++++ .../quantum_item_storage_cell.json | 14 ++++++++ .../dancingsnow/bigger_ae2/init/ModItems.java | 35 ++++++++++++++----- .../resources/META-INF/neoforge.mods.toml | 2 +- 6 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_fluid_storage_cell.json create mode 100644 src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_item_storage_cell.json diff --git a/.gitignore b/.gitignore index c597096..1190180 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ build/ *.ipr +run/ runs/ *.iws out/ diff --git a/gradle/scripts/dependencies.gradle b/gradle/scripts/dependencies.gradle index 6ffe0bb..9039b26 100644 --- a/gradle/scripts/dependencies.gradle +++ b/gradle/scripts/dependencies.gradle @@ -26,7 +26,7 @@ dependencies { // JEI jeiCompileOnly(forge.jei.common.api) { transitive = false } jeiCompileOnly(forge.jei.forge.api) { transitive = false } - jeiCompileOnly(forge.jei.forge.impl) { transitive = false } + jeiImplementation(forge.jei.forge.impl) { transitive = false } // REI reiCompileOnlyApi(forge.rei.plugin) @@ -42,11 +42,11 @@ dependencies { // AE2 // maven haven't uploaded. // ae2Implementation(forge.ae2) { transitive = false } - ae2Implementation("curse.maven:ae2-223794:5662490") + ae2Implementation("curse.maven:applied-energistics-2-223794:5979641") // applied flux - implementation("curse.maven:glodium-957920:5614731") - implementation("curse.maven:applied-flux-965012:5639620") + implementation("curse.maven:glodium-957920:5821676") + implementation("curse.maven:applied-flux-965012:5946853") // lombok compileOnly 'org.projectlombok:lombok:1.18.30' diff --git a/src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_fluid_storage_cell.json b/src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_fluid_storage_cell.json new file mode 100644 index 0000000..afb2033 --- /dev/null +++ b/src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_fluid_storage_cell.json @@ -0,0 +1,14 @@ +{ + "type": "ae2:storage_cell_disassembly", + "cell": "bigger_ae2:quantum_fluid_storage_cell", + "cell_disassembly_items": [ + { + "count": 1, + "id": "bigger_ae2:quantum_cell_component" + }, + { + "count": 1, + "id": "bigger_ae2:advanced_fluid_cell_housing" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_item_storage_cell.json b/src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_item_storage_cell.json new file mode 100644 index 0000000..45f6ab2 --- /dev/null +++ b/src/generated/resources/data/bigger_ae2/recipe/cell_upgrade/quantum_item_storage_cell.json @@ -0,0 +1,14 @@ +{ + "type": "ae2:storage_cell_disassembly", + "cell": "bigger_ae2:quantum_item_storage_cell", + "cell_disassembly_items": [ + { + "count": 1, + "id": "bigger_ae2:quantum_cell_component" + }, + { + "count": 1, + "id": "bigger_ae2:advanced_item_cell_housing" + } + ] +} \ No newline at end of file diff --git a/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java b/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java index 346f7cb..e2e1546 100644 --- a/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java +++ b/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java @@ -1,5 +1,6 @@ package cn.dancingsnow.bigger_ae2.init; +import appeng.recipes.game.StorageCellDisassemblyRecipe; import cn.dancingsnow.bigger_ae2.item.cell.DigitalSingularityCellItem; import appeng.api.stacks.AEKeyType; @@ -17,6 +18,8 @@ import com.tterrag.registrate.providers.RegistrateRecipeProvider; import com.tterrag.registrate.util.entry.ItemEntry; +import java.util.List; + import static cn.dancingsnow.bigger_ae2.BiggerAE2Mod.REGISTRATE; public class ModItems { @@ -66,18 +69,26 @@ public class ModItems { "quantum_item_storage_cell", p -> new BasicStorageCell( p.stacksTo(1), - QUANTUM_CELL_COMPONENT, - ADVANCED_ITEM_CELL_HOUSING, 20, (1 << 28 - 1) / 1024, 65536, 1, AEKeyType.items())) - .recipe((ctx, provider) -> ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get()) + .recipe((ctx, provider) -> { + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get()) .requires(QUANTUM_CELL_COMPONENT) .requires(ADVANCED_ITEM_CELL_HOUSING) .unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_ITEM_CELL_HOUSING)) - .save(provider)) + .save(provider); + provider.accept( + ctx.getId().withPrefix("cell_upgrade/"), + new StorageCellDisassemblyRecipe(ctx.get(), List.of( + QUANTUM_CELL_COMPONENT.asStack(1), + ADVANCED_ITEM_CELL_HOUSING.asStack(1) + )), + null + ); + }) .register(); public static final ItemEntry QUANTUM_FLUID_CELL = REGISTRATE @@ -85,18 +96,26 @@ public class ModItems { "quantum_fluid_storage_cell", p -> new BasicStorageCell( p.stacksTo(1), - QUANTUM_CELL_COMPONENT, - ADVANCED_FLUID_CELL_HOUSING, 20, (1 << 28 - 1) / 1024, 65536, 1, AEKeyType.fluids())) - .recipe((ctx, provider) -> ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get()) + .recipe((ctx, provider) -> { + ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get()) .requires(QUANTUM_CELL_COMPONENT) .requires(ADVANCED_FLUID_CELL_HOUSING) .unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_FLUID_CELL_HOUSING)) - .save(provider)) + .save(provider); + provider.accept( + ctx.getId().withPrefix("cell_upgrade/"), + new StorageCellDisassemblyRecipe(ctx.get(), List.of( + QUANTUM_CELL_COMPONENT.asStack(1), + ADVANCED_FLUID_CELL_HOUSING.asStack(1) + )), + null + ); + }) .register(); public static final ItemEntry SINGULARITY_CELL_COMPONENT = REGISTRATE diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml index 9007484..6407101 100644 --- a/src/main/resources/META-INF/neoforge.mods.toml +++ b/src/main/resources/META-INF/neoforge.mods.toml @@ -34,7 +34,7 @@ license="${mod_license}" [[dependencies."${mod_id}"]] modId="ae2" type="required" - versionRange="[19.0.0,)" + versionRange="[19.0.26,)" ordering="AFTER" side="BOTH" [dependencies."${mod_id}".mc-publish] From 697c599d1a1022d5f9e1cf3bb1cceea42f1af484 Mon Sep 17 00:00:00 2001 From: DancingSnow <1121149616@qq.com> Date: Fri, 13 Dec 2024 20:02:06 +0800 Subject: [PATCH 2/3] bump version to 1.4.5 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index df99990..32e7cc9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,6 +12,6 @@ mod_authors= DancingSnow mod_description = A mod added more ae cells and so on. mod_license = MIT mod_url = https://github.com/GregTech-Exploring-Pioneer/BiggerAE2 -mod_version = 1.4.4 +mod_version = 1.4.5 maven_group = cn.dancingsnow.bigger_ae2 From 452e3fa22a2ae4324c523fc4aa63c02376a0816e Mon Sep 17 00:00:00 2001 From: DancingSnow <1121149616@qq.com> Date: Fri, 13 Dec 2024 20:08:17 +0800 Subject: [PATCH 3/3] spotless --- .../dancingsnow/bigger_ae2/init/ModItems.java | 56 +++++++------------ 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java b/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java index e2e1546..3465b60 100644 --- a/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java +++ b/src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java @@ -1,6 +1,5 @@ package cn.dancingsnow.bigger_ae2.init; -import appeng.recipes.game.StorageCellDisassemblyRecipe; import cn.dancingsnow.bigger_ae2.item.cell.DigitalSingularityCellItem; import appeng.api.stacks.AEKeyType; @@ -9,6 +8,7 @@ import appeng.items.materials.MaterialItem; import appeng.items.materials.StorageComponentItem; import appeng.items.storage.BasicStorageCell; +import appeng.recipes.game.StorageCellDisassemblyRecipe; import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.ShapedRecipeBuilder; @@ -68,26 +68,19 @@ public class ModItems { .item( "quantum_item_storage_cell", p -> new BasicStorageCell( - p.stacksTo(1), - 20, - (1 << 28 - 1) / 1024, - 65536, - 1, - AEKeyType.items())) + p.stacksTo(1), 20, (1 << 28 - 1) / 1024, 65536, 1, AEKeyType.items())) .recipe((ctx, provider) -> { ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get()) - .requires(QUANTUM_CELL_COMPONENT) - .requires(ADVANCED_ITEM_CELL_HOUSING) - .unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_ITEM_CELL_HOUSING)) - .save(provider); + .requires(QUANTUM_CELL_COMPONENT) + .requires(ADVANCED_ITEM_CELL_HOUSING) + .unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_ITEM_CELL_HOUSING)) + .save(provider); provider.accept( - ctx.getId().withPrefix("cell_upgrade/"), - new StorageCellDisassemblyRecipe(ctx.get(), List.of( - QUANTUM_CELL_COMPONENT.asStack(1), - ADVANCED_ITEM_CELL_HOUSING.asStack(1) - )), - null - ); + ctx.getId().withPrefix("cell_upgrade/"), + new StorageCellDisassemblyRecipe( + ctx.get(), + List.of(QUANTUM_CELL_COMPONENT.asStack(1), ADVANCED_ITEM_CELL_HOUSING.asStack(1))), + null); }) .register(); @@ -95,26 +88,19 @@ public class ModItems { .item( "quantum_fluid_storage_cell", p -> new BasicStorageCell( - p.stacksTo(1), - 20, - (1 << 28 - 1) / 1024, - 65536, - 1, - AEKeyType.fluids())) + p.stacksTo(1), 20, (1 << 28 - 1) / 1024, 65536, 1, AEKeyType.fluids())) .recipe((ctx, provider) -> { ShapelessRecipeBuilder.shapeless(RecipeCategory.MISC, ctx.get()) - .requires(QUANTUM_CELL_COMPONENT) - .requires(ADVANCED_FLUID_CELL_HOUSING) - .unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_FLUID_CELL_HOUSING)) - .save(provider); + .requires(QUANTUM_CELL_COMPONENT) + .requires(ADVANCED_FLUID_CELL_HOUSING) + .unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_FLUID_CELL_HOUSING)) + .save(provider); provider.accept( - ctx.getId().withPrefix("cell_upgrade/"), - new StorageCellDisassemblyRecipe(ctx.get(), List.of( - QUANTUM_CELL_COMPONENT.asStack(1), - ADVANCED_FLUID_CELL_HOUSING.asStack(1) - )), - null - ); + ctx.getId().withPrefix("cell_upgrade/"), + new StorageCellDisassemblyRecipe( + ctx.get(), + List.of(QUANTUM_CELL_COMPONENT.asStack(1), ADVANCED_FLUID_CELL_HOUSING.asStack(1))), + null); }) .register();