0
\$\begingroup\$

I want to make some new Recipes with CraftTweaker, which uses machines from the Create mod (I'm using Life In The Village 3), but I have the following error in my scripts:

Error message screenshot

[ERROR]: Error while running scripts:
org.openzen.zenscript.lexer.ParseException: CreateLapisDiamond.zs:16:57: Unknown enum type <constant:create:heat_condition:"heated">
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.api.bracket.custom.EnumConstantBracketHandler.lambda$parse$1(EnumConstantBracketHandler.java:53)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.api.bracket.custom.EnumConstantBracketHandler.parse(EnumConstantBracketHandler.java:53)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.scriptrun.runner.IgnorePrefixCasingBracketParser.parse(IgnorePrefixCasingBracketParser.java:37)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readPrimaryExpression(ParsedExpression.java:562)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readPostfixExpression(ParsedExpression.java:364)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readUnaryExpression(ParsedExpression.java:359)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readMulExpression(ParsedExpression.java:288)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAddExpression(ParsedExpression.java:258)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readShiftExpression(ParsedExpression.java:237)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readCompareExpression(ParsedExpression.java:166)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAndExpression(ParsedExpression.java:156)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readXorExpression(ParsedExpression.java:146)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readOrExpression(ParsedExpression.java:136)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAndAndExpression(ParsedExpression.java:126)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readOrOrExpression(ParsedExpression.java:110)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readConditionalExpression(ParsedExpression.java:97)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAssignExpression(ParsedExpression.java:49)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.parse(ParsedExpression.java:40)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedCallArguments.parse(ParsedCallArguments.java:46)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readPostfixExpression(ParsedExpression.java:399)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readUnaryExpression(ParsedExpression.java:359)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readMulExpression(ParsedExpression.java:288)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAddExpression(ParsedExpression.java:258)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readShiftExpression(ParsedExpression.java:237)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readCompareExpression(ParsedExpression.java:166)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAndExpression(ParsedExpression.java:156)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readXorExpression(ParsedExpression.java:146)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readOrExpression(ParsedExpression.java:136)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAndAndExpression(ParsedExpression.java:126)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readOrOrExpression(ParsedExpression.java:110)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readConditionalExpression(ParsedExpression.java:97)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.readAssignExpression(ParsedExpression.java:49)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.expression.ParsedExpression.parse(ParsedExpression.java:40)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.statements.ParsedStatement.parse(ParsedStatement.java:299)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.statements.ParsedStatement.parse(ParsedStatement.java:81)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.ParsedFile.parse(ParsedFile.java:215)
at TRANSFORMER/[email protected]/org.openzen.zenscript.parser.ParsedFile.parse(ParsedFile.java:158)
at TRANSFORMER/[email protected]/org.openzen.zencode.java.ScriptingEngine.createScriptedModule(ScriptingEngine.java:123)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.scriptrun.runner.ScriptRunner.runScripts(ScriptRunner.java:86)
at TRANSFORMER/crafttwe[email protected]/com.blamejared.crafttweaker.impl.script.scriptrun.runner.ScriptRunner.run(ScriptRunner.java:69)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.scriptrun.DecoratedRunKind$DecoratedScriptRunner.run(DecoratedRunKind.java:27)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.scriptrun.ScriptRun.executeRun(ScriptRun.java:88)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.scriptrun.ScriptRun.execute(ScriptRun.java:54)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.ScriptReloadListener.apply(ScriptReloadListener.java:78)
at TRANSFORMER/[email protected]/com.blamejared.crafttweaker.impl.script.ScriptReloadListener.m_5787_(ScriptReloadListener.java:37)
at TRANSFORMER/[email protected]/net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10789_(SimplePreparableReloadListener.java:13)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482)
at TRANSFORMER/[email protected]/net.minecraft.server.packs.resources.SimpleReloadInstance.m_143940_(SimpleReloadInstance.java:69)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:176)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_205125_(Minecraft.java:2082)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.doLoadLevel(Minecraft.java:1909)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91200_(Minecraft.java:1873)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.m_101744_(WorldSelectionList.java:473)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.m_101704_(WorldSelectionList.java:330)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.worldselection.WorldSelectionList$WorldListEntry.m_6375_(WorldSelectionList.java:257)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.components.AbstractSelectionList.m_6375_(AbstractSelectionList.java:323)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.components.events.ContainerEventHandler.m_6375_(ContainerEventHandler.java:27)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_168084_(MouseHandler.java:88)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.Screen.m_96579_(Screen.java:528)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_91530_(MouseHandler.java:85)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_168091_(MouseHandler.java:185)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:118)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_91565_(MouseHandler.java:184)
at MC-BOOTSTRAP/org.lwjgl.glfw/org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
at MC-BOOTSTRAP/org.lwjgl/org.lwjgl.system.JNI.invokeV(Native Method)
at MC-BOOTSTRAP/org.lwjgl.glfw/org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3174)
at TRANSFORMER/[email protected]/com.mojang.blaze3d.systems.RenderSystem.m_69830_(RenderSystem.java:225)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1071)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91374_(Minecraft.java:665)
at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:205)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149)
[ERROR]: Scripts are invalid!

Here is the script I am using:

import crafttweaker.api.item.IItemStack;
import crafttweaker.api.ingredient.IIngredient;
import crafttweaker.api.recipe.FurnaceRecipeManager;

import mods.create.IProcessingRecipeManager;
import mods.create.MechanicalCrafterManager;
import mods.create.CrushingManager;
import mods.create.SplashingManager;
import mods.create.CompactingManager;
import mods.create.FillingManager;
import mods.create.MixingManager;
import mods.create.PressingManager;



<recipetype:create:compacting>.addRecipe("compact_coal", <constant:create:heat_condition:"heated">, [<item:minecraft:coal>], [<item:minecraft:charcoal>], 100);

<recipetype:create:crushing>.addRecipe("crush_lapis", [<item:minecraft:lapis_lazuli> * 2, <item:minecraft:lapis_lazuli> % 50], <item:create:asurine>, 100);
<recipetype:create:crushing>.addRecipe("crush_dia", [<item:minecraft:diamond> % 1], <item:minecraft:coal_block>, 400);

How do I resolve this error?

\$\endgroup\$
0

1 Answer 1

0
\$\begingroup\$

"Unknown enum type" means the game doesn't recognize <constant:create:heat_condition:"heated"> as being a valid label for a state.

So, let's search for that key phrase constant:create:heat_condition to find out what are valid enum values we can use to describe heat conditions.

When I do this, the first result is HeatCondition - CraftTweaker Documentation, which says the available values are:

<constant:create:heat_condition:none>
<constant:create:heat_condition:heated>
<constant:create:heat_condition:superheated>

Note that there are no quotation marks around heated, but in your script, there are. That means you should delete the quotation marks around heated in your script, so it matches one of the values above exactly.

\$\endgroup\$
1
  • \$\begingroup\$ I've tried the script without the quotation marks around heated and it's still telling me the same error. \$\endgroup\$
    – Lucas Plt
    Jun 7 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .