Create Crafts & Additions

Create Crafts & Additions

61M Downloads

Mekanism compat recipes are broken

airi-asagi opened this issue · 2 comments

commented

The format of the .json files to add compatibility with Mekanism is outdated, and the recipes are not being added correctly.

neoforge-21.1.172
createaddition-1.4.2

commented

Getting the same error message from KubeJS, specifically, it is complaining about src/main/resources/data/createaddition/recipe/compat/mekanism/rose_quartz_enriching.json

This is on the FTB Evolution modpack v 1.19..0, Neoforge 1.21.1 - 21.1.172, Addditions 1.4.2

[02:43:55] [ERROR] ! RegistryAccessContainer.java#150: Failed to read input:flat_sized_ingredient from recipe createaddition:compat/mekanism/rose_quartz_enriching[mekanism:enriching]: java.util.NoSuchElementException: No value present [02:43:55] [ERROR] ! java.util.NoSuchElementException: No value present [02:43:55] [ERROR] ! at java.util.Optional.orElseThrow(Optional.java:377) [02:43:55] [ERROR] ! at …kubejs.util.RegistryAccessContainer.decodeJson(RegistryAccessContainer.java:150) [02:43:55] [ERROR] ! at …kubejs.recipe.component.RecipeComponent.readFromJson(RecipeComponent.java:139) [02:43:55] [ERROR] ! at …kubejs.recipe.KubeRecipe.deserialize(KubeRecipe.java:78) [02:43:55] [ERROR] ! at …kubejs.recipe.schema.RecipeSchema.deserialize(RecipeSchema.java:255) [02:43:55] [ERROR] ! at …kubejs.recipe.RecipesKubeEvent.parseOriginalRecipe(RecipesKubeEvent.java:241) [02:43:55] [ERROR] ! at …kubejs.recipe.RecipesKubeEvent.discoverRecipes(RecipesKubeEvent.java:219) [02:43:55] [ERROR] ! at …kubejs.recipe.RecipesKubeEvent.post(RecipesKubeEvent.java:179) [02:43:55] [ERROR] ! at net.minecraft.world.item.crafting.RecipeManager.handler$fim000$kubejs$customRecipesHead(RecipeManager.java:5577) [02:43:55] [ERROR] ! at net.minecraft.world.item.crafting.RecipeManager.apply(RecipeManager.java) [02:43:55] [ERROR] ! at com.recipeessentials.recipecache.RecipeManager.apply(RecipeManager.java:261) [02:43:55] [ERROR] ! at com.recipeessentials.recipecache.RecipeManager.apply(RecipeManager.java:24) [02:43:55] [ERROR] ! at net.minecraft.server.packs.resources.SimplePreparableReloadListener.lambda$reload$1(SimplePreparableReloadListener.java:19) [02:43:55] [ERROR] ! at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) [02:43:55] [ERROR] ! at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) [02:43:55] [ERROR] ! at net.minecraft.server.packs.resources.SimpleReloadInstance.lambda$new$3(SimpleReloadInstance.java:69) [02:43:55] [ERROR] ! at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:148) [02:43:55] [ERROR] ! at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) [02:43:55] [ERROR] ! at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:122) [02:43:55] [ERROR] ! at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:132) [02:43:55] [ERROR] ! at net.minecraft.client.Minecraft.managedBlock(Minecraft.java:6518) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.loadWorldDataBlocking(WorldOpenFlows.java:201) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.loadWorldStem(WorldOpenFlows.java:142) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.openWorldLoadLevelStem(WorldOpenFlows.java:345) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.openWorldCheckVersionCompatibility(WorldOpenFlows.java:334) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.openWorldLoadLevelData(WorldOpenFlows.java:296) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldOpenFlows.openWorld(WorldOpenFlows.java:261) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.joinWorld(WorldSelectionList.java:498) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.mouseClicked(WorldSelectionList.java:481) [02:43:55] [ERROR] ! at net.minecraft.client.gui.components.AbstractSelectionList.mouseClicked(AbstractSelectionList.java:315) [02:43:55] [ERROR] ! at net.minecraft.client.gui.components.events.ContainerEventHandler.mouseClicked(ContainerEventHandler.java:38) [02:43:55] [ERROR] ! at net.minecraft.client.MouseHandler.lambda$onPress$0(MouseHandler.java:98) [02:43:55] [ERROR] ! at net.minecraft.client.gui.screens.Screen.wrapScreenError(Screen.java:451) [02:43:55] [ERROR] ! at net.minecraft.client.MouseHandler.onPress(MouseHandler.java:95) [02:43:55] [ERROR] ! at net.minecraft.client.MouseHandler.lambda$setup$4(MouseHandler.java:202) [02:43:55] [ERROR] ! at net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:98) [02:43:55] [ERROR] ! at net.minecraft.client.MouseHandler.lambda$setup$5(MouseHandler.java:202) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]+5/org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]+5/org.lwjgl.system.JNI.invokeV(Native Method) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]+5/org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3509) [02:43:55] [ERROR] ! at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:162) [02:43:55] [ERROR] ! at net.minecraft.client.Minecraft.runTick(Minecraft.java:1220) [02:43:55] [ERROR] ! at net.minecraft.client.Minecraft.run(Minecraft.java:807) [02:43:55] [ERROR] ! at net.minecraft.client.main.Main.main(Main.java:230) [02:43:55] [ERROR] ! at java.lang.reflect.Method.invoke(Method.java:580) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:136) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:124) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonClientLaunchHandler.runService(CommonClientLaunchHandler.java:32) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/net.neoforged.fml.loading.targets.CommonLaunchHandler.lambda$launchService$4(CommonLaunchHandler.java:118) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:103) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:74) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [02:43:55] [ERROR] ! at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [02:43:55] [ERROR] ! at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.run(BootstrapLauncher.java:210) [02:43:55] [ERROR] ! at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:69) [02:43:55] [WARN] KubeRecipe.java#88: Failed to parse recipe 'createaddition:compat/mekanism/rose_quartz_enriching[mekanism:enriching]'! Falling back to vanilla: Recipe component key 'input' not found! Valid keys: [input:flat_sized_ingredient, output:item_stack]

commented

I want to find something to break....... 3 hours. It took 3 hours of testing to find some kind of result to fix this until the devs can correct the error within the JSON themselves. Here is what I ended up doing.

KubeJS Server Script

ServerEvents.recipes(event => {

//Polished Rose Quartz from enriching Rose Quartz
    event.custom({
        type: "mekanism:enriching",
        input: {
            count: 1,
            tag: "create:rose_quartz"
        },
        output: {
            count: 1,
            id: "create:polished_rose_quartz"
        },
    }).id("ftb:enriched_carbon_geode");
})

ServerEvents.tags("item", (event) => {
  //Adding tags to remove Barrier icons in JEI
  event.add("create:rose_quartz", "create:rose_quartz")
})

Also, within \kubejs\data\createaddition\recipe\compat\mekanism\rose_quartz_enriching.json add the following:

{
    "neoforge:conditions": [{
            "type": "neoforge:false"
        }
    ]
}

With these two files, the recipe will work just fine without issue and the error will no longer clog up the log files.