Closed AncientShotgun closed 2 months ago
For privacy reasons, I am unable to supply any crash logs. without crash logs It'll be harder to help you.
Apologies for any inconvenience; I have obfuscated all personal information: latest.log crash-2024-09-04_14.48.48-client.txt
the attached script doesn't match the log you've sent.
anyway, try putting the recipe modifiers in the call in []
like this:
.recipeModifiers([GTRecipeModifiers.PARALLEL_HATCH, GTRecipeModifiers.ELECTRIC_OVERCLOCK.apply(OverclockingLogic.NON_PERFECT_OVERCLOCK)])
Oh, I see. Make the input an array, which might match better to the varargs collection type the method takes as input. I will try this and report back.
Test results are positive! MInecraft launches successfully and loads my singleplayer world correctly. I will soon create a new issue in your documentation repository asking for this fix to be reflected in your documentation, but at this point this issue is solved; I will close it.
Checked for existing issues
Tested latest version
GregTech CEu Version
v1.4.0
Minecraft Version
1.20.1
Recipe Viewer Installed
EMI
Environment
Singleplayer
Cross-Mod Interaction
Yes
Other Installed Mods
Modpack is lightly modified instance of Sky Greg v1.25, in which I have updated GTCEu Modern from v1.1.4a to 1.4.0 Relevant mod versions are: Rhino 2001.2.3-build.6 KubeJS 2001.6.5-build.14
Expected Behavior
Expected behaviour: No error is thrown when more than one recipe modifier is given as input in the
.recipeModifiers()
method of theMultiblockBuilder
of a multiblock machine I am customizing.Actual Behavior
Actual behaviour: Rhino errors are thrown to the Minecraft console stating that Rhino cannot find a method in
com.gregtechceu.gtceu.api.registry.registrate.MultiblockMachineBuilder
called.recipeModifiers
that takes input parameters of typecom.gregtechceu.gtceu.common.data.GTRecipeModifiers$$Lambda$18211/0x00000195a15db398
(corresponds to theGTRecipeModifers.PARALLEL_HATCH
modifier) andcom.gregtechceu.gtceu.common.data.GTRecipeModifiers$ElectricOverclockModifier
(corresponds toGTRecipeModifiers.ELECTRIC_OVERCLOCK
withOverclockingLogic.PERFECT_OVERCLOCK
orOverclockingLogic.NON_PERFECT_OVERCLOCK
applied). These errors are fatal and cause Minecraft to crash to desktop with exit code -1.Steps to Reproduce
1) Using the mods listed above at their listed versions, define in a KubeJS script an arbitrary custom multiblock via a builder, using the step-by-step instructions given in the GTCEu Modern documentation, making sure to add more than one recipe modifer to it via the
.recipeModifiers()
method of the builder. 2) Attempt to launch Minecraft. 3) After the Mod Gather stage is completed, Rhino will immediately throw the relevant errors and crash Minecraft to desktop.Additional Information
Here is the script I am modifying that Rhino throws the errors on: CUSTOM MULTIBLOCKS.zip I placed it in the minecraft/kubejs/startup_scripts folder, as instructed. For privacy reasons, I am unable to supply any crash logs.