Applied Energistics 2

Applied Energistics 2

137M Downloads

Disabling some features leads to launch errors.

checkem opened this issue ยท 3 comments

commented

Describe the bug
In the most recent version from the website - rv6.stable build 4. When you disable some features you will get an error. Let me explain. Ender IO and AE add similar materials to the game, that is Silicon and Flour, also machines that serve a similar purpose - the grindstone. Since EIO does not provide a way to disable these materials and/or blocks in their mod, I have tried the AE2 configuration file (AppliedEnergistics2.cfg).
I have disabled certain features like so:
B:Flour=false
B:TinyTNT=false
B:GrindStone=false
B:Silicon=false
I only replaced "true" value with "false", didn't change anything else in the config.
And had the followng errors:

[17:26:30] [main/ERROR] [FML]: Parsing error loading recipe appliedenergistics2:misc/tiny_tnt
com.google.gson.JsonSyntaxException: Unknown item 'appliedenergistics2:tiny_tnt'
at net.minecraftforge.common.crafting.CraftingHelper.getItemStack(CraftingHelper.java:212) ~[CraftingHelper.class:?]
at net.minecraftforge.oredict.ShapedOreRecipe.factory(ShapedOreRecipe.java:254) ~[ShapedOreRecipe.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:409) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:711) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:822) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:668) ~[CraftingHelper.class:?]
at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_191]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:620) [CraftingHelper.class:?]
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:534) [bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
[17:26:30] [main/ERROR] [FML]: Parsing error loading recipe appliedenergistics2:misc/grindstone_crank
com.google.gson.JsonSyntaxException: Unknown item 'appliedenergistics2:crank'
at net.minecraftforge.common.crafting.CraftingHelper.getItemStack(CraftingHelper.java:212) ~[CraftingHelper.class:?]
at net.minecraftforge.oredict.ShapedOreRecipe.factory(ShapedOreRecipe.java:254) ~[ShapedOreRecipe.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:409) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:711) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:822) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:668) ~[CraftingHelper.class:?]
at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_191]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:620) [CraftingHelper.class:?]
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:534) [bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
[17:26:30] [main/ERROR] [FML]: Parsing error loading recipe appliedenergistics2:misc/grindstone
com.google.gson.JsonSyntaxException: Unknown item 'appliedenergistics2:grindstone'
at net.minecraftforge.common.crafting.CraftingHelper.getItemStack(CraftingHelper.java:212) ~[CraftingHelper.class:?]
at net.minecraftforge.oredict.ShapedOreRecipe.factory(ShapedOreRecipe.java:254) ~[ShapedOreRecipe.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.getRecipe(CraftingHelper.java:409) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.lambda$loadRecipes$22(CraftingHelper.java:711) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:822) ~[CraftingHelper.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:668) ~[CraftingHelper.class:?]
at java.util.ArrayList.forEach(Unknown Source) [?:1.8.0_191]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:620) [CraftingHelper.class:?]
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:534) [bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
[17:26:30] [main/ERROR] [FML]: Parsing error loading recipe appliedenergistics2:smelting/silicon
com.google.gson.JsonSyntaxException: Couldn't find the resulting item in AE. This means AE was provided a recipe that it shouldn't be handling.
Was looking for : 'material.silicon'.
at appeng.recipes.factories.recipes.PartRecipeFactory.getPart(PartRecipeFactory.java:118) ~[PartRecipeFactory.class:?]
at appeng.recipes.factories.recipes.PartRecipeFactory.getResult(PartRecipeFactory.java:86) ~[PartRecipeFactory.class:?]
at appeng.recipes.factories.recipes.PartRecipeFactory.getResult(PartRecipeFactory.java:77) ~[PartRecipeFactory.class:?]
at appeng.recipes.handlers.SmeltingHandler.register(SmeltingHandler.java:22) ~[SmeltingHandler.class:?]
at appeng.recipes.AERecipeLoader.register(AERecipeLoader.java:122) ~[AERecipeLoader.class:?]
at appeng.recipes.AERecipeLoader.process(AERecipeLoader.java:83) ~[AERecipeLoader.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.findFiles(CraftingHelper.java:822) [CraftingHelper.class:?]
at appeng.recipes.AERecipeLoader.loadProcessingRecipes(AERecipeLoader.java:54) [AERecipeLoader.class:?]
at appeng.core.Registration.registerRecipes(Registration.java:323) [Registration.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_8_Registration_registerRecipes_Register.invoke(.dynamic) [?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) [ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144) [EventBus$1.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:787) [GameData.class:?]
at net.minecraftforge.common.crafting.CraftingHelper.loadRecipes(CraftingHelper.java:623) [CraftingHelper.class:?]
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:742) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:534) [bib.class:?]
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:377) [bib.class:?]
at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_191]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_191]
at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]

I have also tried to disable the entries separately, one by one and only disabling the flour did not result in any errors. Everything else gives its respective error message.

To Reproduce
To reproduce this simply install AE2, ender IO, their dependencies and disable silicon, TinyTNT and Grindstone in the AE2 config file (AppliedEnergistics2.cfg). The game version is 1.12.2, forge version is 1.12.2-14.23.5.2768

Expected behavior
If no other mods that provide a similar item are installed, the item should not be loaded at all. Otherwise only one entry for each item disabled should remain in the game, and that is not AE2s(because AE2s item was disabled in the config file.

Environment
Java version is jre1.8.0_191 x64
EIO is modular install version 5.0.38
complete list of mods:
untitled

  • Minecraft Version: 1.12.2
  • AE2 Version: rv6.stable build 4
  • Forge Version: 1.12.2-14.23.5.2768
commented

Forge recipe handling is extremely lacking many things to handle these in a way, which would at least allow us to keep at least a bit of sanity to handle every corner case when dealing with optional items. And I doubt they will ever fix it for 1.12. Or in some cases it is even not possible due to how some things are registered.

Some vanilla features for 1.13 would theoretically make it easier to handle it. Yet some others will most likely make it much more difficult to actually use. And some rumours about Forge are basically that it will no longer be a real option with 1.13. So the best idea is getting used to dealing with dozens of the same item type.

commented

Apologize for reviving a closed issue ticket, but I would like to point out that Forge does have a mechanics that allows conditionally loading a JSON recipe. That being said, structures like the following which are currently used in AE's _constants.json:

"conditions": [
    {
        "type": "appliedenergistics2:features",
        "features": [
            "interface"
        ]
    }
]

are also allowed in a JSON recipe. When conditions field is present, Forge would try evaluating these conditions first, and skip loading that specific JSON recipe as a whole if the final result is evaluated to false. Elements in that JSON array are combined together using conjunction (logic AND). In addition to that, Forge also provides several conditions on itself (namely forge:and, forge:not, forge:or, forge:false, forge:mod_loaded and minecraft:item_exists) which should cover many use cases; it is also possible to create custom conditions which AE has already been doing, as the JSON snippet above implies.
As such, I believe it is possible to address this issue for 1.12.2, and it is worth doing so because it would be more intuitive for users. I can offer a PR if that would be welcome.

commented

That is the not so sane option. There are currently about 130 AEFeatures or so. Of course some aren't relevant for recipes. But I would guess it should be something in the range of 60-90. With each item/recipe being affected by a couple ones. Without taking transitive ones into account now. If so, there are probably a couple hundred permutations for most recipes, which need to be supported.

In some cases what is possible via _constants.json or similar is completely bugged. E.g. you can't use wildcards for metadata anymore, but it will no longer crash. So you can either choose between recipes never working or crashes in some cases, but working otherwise.

If you would like to tackle it, feel free. I just feel like it will be a pretty hefty amount of work. Which will be immediately thrown out be the next modpack via CT, because they don't like it using iron and want to use steel instead. Or so.