Skip to content

Commit

Permalink
Removing the need for removal of Applied Energistics-2 recipes in New…
Browse files Browse the repository at this point in the history
…HorizonsCoreMod (#453)

* Migrating Recipes

* Adding the optional loading

* More moving of recipes

* Cleanup
  • Loading branch information
Cardinalstars authored Feb 4, 2024
1 parent 04e8e1c commit 77c99cd
Show file tree
Hide file tree
Showing 88 changed files with 382 additions and 297 deletions.
8 changes: 8 additions & 0 deletions src/main/java/appeng/core/RecipeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import appeng.recipes.loader.ConfigLoader;
import appeng.recipes.loader.JarLoader;
import appeng.recipes.loader.RecipeResourceCopier;
import cpw.mods.fml.common.Loader;

/**
* handles the decision if recipes should be loaded from jar, loaded from file system or force copied from jar
Expand All @@ -39,6 +40,7 @@ public class RecipeLoader implements Runnable {
* recipe path in the jar
*/
private static final String ASSETS_RECIPE_PATH = "/assets/appliedenergistics2/recipes/";
private static final String ASSETS_EASY_RECIPE_PATH = "/assets/appliedenergistics2/recipes/";

@Nonnull
private final IRecipeHandler handler;
Expand Down Expand Up @@ -90,9 +92,15 @@ public final void run() {
catch (final IOException | URISyntaxException e) {
AELog.debug(e);
this.handler.parseRecipes(new JarLoader(ASSETS_RECIPE_PATH), "index.recipe");
if (!Loader.isModLoaded("dreamcraft")) {
this.handler.parseRecipes(new JarLoader(ASSETS_EASY_RECIPE_PATH), "index.recipe");

This comment has been minimized.

Copy link
@AnrDaemon

AnrDaemon Feb 7, 2024

Is this correct that recipes are parsed twice in a row?

This comment has been minimized.

Copy link
@Pilzinsel64

Pilzinsel64 Feb 13, 2024

Have the same question. I want to find the reason why the easy mode recipes are completely broken since that change. But can't test it in dev until next week due l missing time.

This comment has been minimized.

Copy link
@AnrDaemon

AnrDaemon Feb 14, 2024

I'd write it as

this.handler.parseRecipes(new JarLoader(Loader.isModLoaded("dreamcraft") ? ASSETS_GT_RECIPE_PATH : ASSETS_RECIPE_PATH), "index.recipe");

"ASSETS_EASY_RECIPE_PATH" bears no sense.

This comment has been minimized.

Copy link
@AnrDaemon

AnrDaemon Feb 14, 2024

If recipes loading is broken in dev, try compiling the mod and running a regular client. Perhaps it is related to assets loading.

This comment has been minimized.

Copy link
@Pilzinsel64

Pilzinsel64 Feb 14, 2024

Yea, did it similar to your suggestion now. ;)

If recipes loading is broken in dev, try compiling the mod and running a regular client. Perhaps it is related to assets loading.

It's not working on a real client too. At least it doesn't load my custom recipes and the generated folder is empty.

It fails to find the jar file for whatever reason. Not sure why.

}
}
} else {
this.handler.parseRecipes(new JarLoader(ASSETS_RECIPE_PATH), "index.recipe");
if (!Loader.isModLoaded("dreamcraft")) {
this.handler.parseRecipes(new JarLoader(ASSETS_EASY_RECIPE_PATH), "index.recipe");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alias=mc -> minecraft
alias=ae2 -> appliedenergistics2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#From decorative/certus
shaped=
ae2:BlockQuartz ae2:BlockQuartz
-> 2 ae2:BlockQuartzChiseled
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import=decorative/certus.recipe
import=decorative/crystals.recipe
import=decorative/fixtures.recipe
import=decorative/quartzglass.recipe
import=decorative/skystone.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
group= oredictionary:itemIlluminatedPanel -> monitor
group= ae2:BlockInterface ae2:ItemPart.Interface -> interface

group= ae2:ToolCertusQuartzCuttingKnife:* ae2:ToolNetherQuartzCuttingKnife:* -> knife
group= ae2:ToolCertusQuartzWrench ae2:ToolNetherQuartzWrench -> wrench

group= ae2:CableGlass ae2:CableCovered ae2:CableSmart -> cable
group= ae2:CableDense -> densecable

group= mc:iron_ingot oredictionary:ingotCopper oredictionary:ingotTin oredictionary:ingotSilver oredictionary:ingotLead oredictionary:ingotBronze oredictionary:ingotBrass oredictionary:ingotNickel oredictionary:ingotInvar oredictionary:ingotAluminium -> metalIngots
group= oredictionary:dustEnder oredictionary:dustEnderPearl -> dustEnder

group=oredictionary:blockGlass oredictionary:glass mc:glass -> glass
group=oredictionary:wool mc:wool:* -> wool

group=oredictionary:crystalCertusQuartz oredictionary:crystalNetherQuartz ae2:ItemMaterial.CertusQuartzCrystalCharged -> crystalQuartz
group=oredictionary:dustCertusQuartz oredictionary:dustNetherQuartz -> dustQuartz

group=oredictionary:crystalCertusQuartz ae2:ItemMaterial.CertusQuartzCrystalCharged ae2:ItemMaterial.PurifiedCertusQuartzCrystal -> certusCrystal
group=oredictionary:crystalNetherQuartz ae2:ItemMaterial.PurifiedNetherQuartzCrystal -> netherCrystal
group=oredictionary:crystalFluix ae2:ItemMaterial.PurifiedFluixCrystal -> fluixCrystal
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Crash on Issues
crash=false

# Hides Exceptions and just display messages.
exceptions=false

# Error on Missing Items ( default is no because AE2 allows you to enable/disable items without modifying recipes. )
erroronmissing=true

# Important, keep in this order
import=aliases.recipe
import=oredict.recipe
import=groups.recipe

# All actual recipes
import=decorative/index.recipe
import=materials/index.recipe
import=misc/index.recipe
import=network/index.recipe
import=tools/index.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
shaped=
oredictionary:ingotGold oredictionary:ingotIron _,
oredictionary:dustRedstone ae2:ItemMaterial.CalcProcessor oredictionary:ingotIron,
oredictionary:ingotGold oredictionary:ingotIron _
-> 2 ae2:ItemMaterial.BasicCard

shaped=
oredictionary:gemDiamond oredictionary:ingotIron _,
oredictionary:dustRedstone ae2:ItemMaterial.CalcProcessor oredictionary:ingotIron,
oredictionary:gemDiamond oredictionary:ingotIron _
-> 2 ae2:ItemMaterial.AdvCard

shapeless=
ae2:ItemMaterial.BasicCard certusCrystal
-> ae2:ItemMaterial.CardCapacity

shapeless=
ae2:ItemMaterial.BasicCard mc:redstone_torch
-> ae2:ItemMaterial.CardRedstone

shapeless=
ae2:ItemMaterial.AdvCard wool
-> ae2:ItemMaterial.CardFuzzy

shapeless=
ae2:ItemMaterial.AdvCard mc:redstone_torch
-> ae2:ItemMaterial.CardInverter

shapeless=
ae2:ItemMaterial.AdvCard fluixCrystal
-> ae2:ItemMaterial.CardSpeed

shapeless=
ae2:ItemMaterial.BasicCard oredictionary:craftingTableWood
-> ae2:ItemMaterial.CardCrafting

shapeless=
ae2:ItemMaterial.BasicCard oredictionary:slimeball
-> ae2:ItemMaterial.CardSticky
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import=materials/cards.recipe
import=materials/cores.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
shapeless=
ae2:BlockFluix
-> 4 ae2:ItemMaterial.FluixCrystal
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import=misc/chest.recipe
import=misc/deconstruction.recipe
import=misc/fluixpreal.recipe
import=misc/meteors.recipe
import=misc/seeds.recipe
import=misc/tinytnt.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import=network/blocks/cellworkbench.recipe
import=network/blocks/controller.recipe
import=network/blocks/crystal-processing.recipe
import=network/blocks/energy.recipe
import=network/blocks/inscribers.recipe
import=network/blocks/interfaces.recipe
import=network/blocks/io.recipe
import=network/blocks/quantum.recipe
import=network/blocks/security.recipe
import=network/blocks/spatial-io.recipe
import=network/blocks/storage.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
shapeless=
ae2:ItemPart.Interface
-> ae2:BlockInterface

shaped=
oredictionary:ingotIron glass oredictionary:ingotIron,
ae2:ItemMaterial.AnnihilationCore _ ae2:ItemMaterial.FormationCore,
oredictionary:ingotIron glass oredictionary:ingotIron
-> ae2:BlockInterface
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shapeless=
ae2:CableGlass
wool
-> ae2:CableCovered.Fluix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
shapeless=
ae2:CableCovered ae2:CableCovered ae2:CableCovered ae2:CableCovered
-> ae2:CableDenseCovered.Fluix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shapeless=
ae2:CableCovered ae2:CableCovered ae2:CableCovered ae2:CableCovered
oredictionary:dustRedstone oredictionary:dustGlowstone
-> ae2:CableDense.Fluix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
shapeless=
ae2:ItemPart.QuartzFiber fluixCrystal fluixCrystal
-> 4 ae2:CableGlass.Fluix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import=network/cables/covered.recipe
import=network/cables/dense.recipe
import=network/cables/dense-covered.recipe
import=network/cables/glass.recipe
import=network/cables/smart.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shapeless=
ae2:CableCovered
oredictionary:dustRedstone oredictionary:dustGlowstone
-> ae2:CableSmart.Fluix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import=network/cells/empty.recipe
import=network/cells/spatial-components.recipe
import=network/cells/spatial.recipe
import=network/cells/storage-components.recipe
import=network/cells/spatial-components.recipe
import=network/cells/storage.recipe
import=network/cells/view.recipe
import=network/cells/storage-components.recipe
import=network/cells/view.recipe
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
shapeless=
ae2:ItemMaterial.Cell1kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.1k

shapeless=
ae2:ItemMaterial.Cell4kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.4k

shapeless=
ae2:ItemMaterial.Cell16kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.16k

shapeless=
ae2:ItemMaterial.Cell64kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.64k

shapeless=
ae2:ItemMaterial.Cell256kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.256k

shapeless=
ae2:ItemMaterial.Cell1024kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.1024k

shapeless=
ae2:ItemMaterial.Cell4096kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.4096k

shapeless=
ae2:ItemMaterial.Cell16384kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.16384k

shaped=
ae2:BlockQuartzGlass oredictionary:dustRedstone ae2:BlockQuartzGlass,
oredictionary:dustRedstone ae2:ItemMaterial.Cell1kPart oredictionary:dustRedstone,
Expand All @@ -46,6 +22,9 @@ shaped=
oredictionary:ingotIron oredictionary:ingotIron oredictionary:ingotIron
-> ae2:ItemBasicStorageCell.64k

shapeless=
ae2:ItemMaterial.Cell4kPart ae2:BlockChest ae2:ItemMaterial.LogicProcessor -> ae2:ItemExtremeStorageCell.Container

shaped=
ae2:BlockQuartzGlass oredictionary:dustFluix ae2:BlockQuartzGlass,
oredictionary:dustFluix ae2:ItemMaterial.Cell256kPart oredictionary:dustFluix,
Expand All @@ -70,15 +49,6 @@ shaped=
oredictionary:gemDiamond oredictionary:gemDiamond oredictionary:gemDiamond
-> ae2:ItemAdvancedStorageCell.16384k

shaped=
ae2:BlockQuartzGlass oredictionary:dustRedstone ae2:BlockQuartzGlass,
oredictionary:dustRedstone mc:ender_pearl oredictionary:dustRedstone,
oredictionary:ingotIron oredictionary:ingotIron oredictionary:ingotIron
-> ae2:ItemVoidStorageCell

shapeless=
ae2:ItemMaterial.Cell4kPart ae2:BlockChest ae2:ItemMaterial.LogicProcessor -> ae2:ItemExtremeStorageCell.Container

shaped=
ae2:BlockQuantumRing ae2:ItemMaterial.Cell16384kPart ae2:BlockQuantumRing,
ae2:ItemMaterial.Cell16384kPart ae2:BlockDenseEnergyCell ae2:ItemMaterial.Cell16384kPart,
Expand All @@ -90,3 +60,33 @@ shaped=
ae2:ItemExtremeStorageCell.Quantum ae2:BlockCondenser ae2:ItemExtremeStorageCell.Quantum,
ae2:ItemExtremeStorageCell.Quantum ae2:ItemExtremeStorageCell.Quantum ae2:ItemExtremeStorageCell.Quantum
-> ae2:ItemExtremeStorageCell.Singularity

shaped=
ae2:BlockQuartzGlass oredictionary:dustRedstone ae2:BlockQuartzGlass,
oredictionary:dustRedstone mc:ender_pearl oredictionary:dustRedstone,
oredictionary:ingotIron oredictionary:ingotIron oredictionary:ingotIron
-> ae2:ItemVoidStorageCell

shapeless=
ae2:ItemMaterial.Cell1kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.1k

shapeless=
ae2:ItemMaterial.Cell4kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.4k

shapeless=
ae2:ItemMaterial.Cell16kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.16k

shapeless=
ae2:ItemMaterial.Cell64kPart ae2:ItemMaterial.EmptyStorageCell -> ae2:ItemBasicStorageCell.64k

shapeless=
ae2:ItemMaterial.Cell256kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.256k

shapeless=
ae2:ItemMaterial.Cell1024kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.1024k

shapeless=
ae2:ItemMaterial.Cell4096kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.4096k

shapeless=
ae2:ItemMaterial.Cell16384kPart ae2:ItemMaterial.EmptyAdvancedStorageCell -> ae2:ItemAdvancedStorageCell.16384k
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
shaped=
oredictionary:ingotIron ae2:ItemMaterial.CalcProcessor oredictionary:ingotIron,
cable ae2:ItemMaterial.LogicProcessor cable,
oredictionary:ingotIron ae2:ItemMaterial.CalcProcessor oredictionary:ingotIron
-> ae2:BlockCraftingUnit:0

# co processor
shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.EngProcessor
-> ae2:BlockCraftingUnit:1

shapeless=
ae2:BlockCraftingUnit:1
ae2:BlockCraftingUnit:1
ae2:BlockCraftingUnit:1
ae2:BlockCraftingUnit:1
-> ae2:BlockCraftingUnit:2

shapeless=
ae2:BlockCraftingUnit:2
ae2:BlockCraftingUnit:2
ae2:BlockCraftingUnit:2
ae2:BlockCraftingUnit:2
-> ae2:BlockCraftingUnit:3

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemPart.StorageMonitor
-> ae2:BlockCraftingMonitor

# various storage sizes
shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell1kPart
-> ae2:BlockCraftingStorage:0

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell4kPart
-> ae2:BlockCraftingStorage:1

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell16kPart
-> ae2:BlockCraftingStorage:2

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell64kPart
-> ae2:BlockCraftingStorage:3

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell256kPart
-> ae2:BlockAdvancedCraftingStorage:0

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell1024kPart
-> ae2:BlockAdvancedCraftingStorage:1

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell4096kPart
-> ae2:BlockAdvancedCraftingStorage:2

shapeless=
ae2:BlockCraftingUnit:0
ae2:ItemMaterial.Cell16384kPart
-> ae2:BlockAdvancedCraftingStorage:3

shapeless=
ae2:ItemExtremeStorageCell.Singularity
ae2:ItemExtremeStorageCell.Singularity
ae2:ItemExtremeStorageCell.Singularity
ae2:ItemExtremeStorageCell.Singularity
ae2:BlockCraftingUnit:0
ae2:ItemExtremeStorageCell.Singularity
ae2:ItemExtremeStorageCell.Singularity
ae2:ItemExtremeStorageCell.Singularity
ae2:ItemExtremeStorageCell.Singularity
-> ae2:BlockSingularityCraftingStorage:0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import=network/crafting/cpu.recipe
import=network/crafting/patterns.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import=network/blocks/index.recipe
import=network/cables/index.recipe
import=network/cells/index.recipe
import=network/crafting/index.recipe
import=network/parts/index.recipe
import=network/wireless.recipe
Loading

0 comments on commit 77c99cd

Please sign in to comment.