Skip to content

Commit

Permalink
Merge pull request #27 from DancingSnow0517/update_ae2
Browse files Browse the repository at this point in the history
update ae2 to 19.0.26, fix crash with newest ae2 version
  • Loading branch information
DancingSnow0517 authored Dec 13, 2024
2 parents bf4dde8 + 452e3fa commit b42db5e
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
build/
*.ipr
run/
runs/
*.iws
out/
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions gradle/scripts/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
57 changes: 31 additions & 26 deletions src/main/java/cn/dancingsnow/bigger_ae2/init/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,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;
Expand All @@ -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 {
Expand Down Expand Up @@ -65,38 +68,40 @@ public class ModItems {
.item(
"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())
.requires(QUANTUM_CELL_COMPONENT)
.requires(ADVANCED_ITEM_CELL_HOUSING)
.unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_ITEM_CELL_HOUSING))
.save(provider))
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);
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<BasicStorageCell> QUANTUM_FLUID_CELL = REGISTRATE
.item(
"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())
.requires(QUANTUM_CELL_COMPONENT)
.requires(ADVANCED_FLUID_CELL_HOUSING)
.unlockedBy("has_item", RegistrateRecipeProvider.has(ADVANCED_FLUID_CELL_HOUSING))
.save(provider))
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);
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<MaterialItem> SINGULARITY_CELL_COMPONENT = REGISTRATE
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b42db5e

Please sign in to comment.