#MoreJS | Recipe Catalyst error due to updated JEI formatting

47 messages · Page 1 of 1 (latest)

frosty warren
hushed spireBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

compact egretBOT
#

Paste version of depot_crafting.js, client.log from @frosty warren

stiff pulsar
#

@tawny wind

tawny wind
#

why it should be a morejs thing? Its an error because of an ambiguous call

tawny wind
frosty warren
#

The script became faulty after several JEI updates

frosty warren
compact egretBOT
#

Paste version of depot_crafting.js, console.log from @frosty warren

mental ibex
#

make it an array and it should work

#

err and use Item.of("create:depot")

#

🥱good night

frosty warren
compact egretBOT
#

Paste version of client.log, depot_craftingv2.js from @frosty warren

mental ibex
#

hmmm why did it convert to object

#

i would force cast that function lmfao

#

i just don’t recall how

mental ibex
#

try doing this, idk if it still works or not. it’s stupid but the only thing i can think of right now. hope it works 🤞🏽

event.data.addRecipeCatalyst["net.minecraft.world.item.ItemStack","mezz.jei.api.recipe.RecipeType[]"](Item.of("create:depot"), [global.depotCraftingType])
#

@frosty warren

frosty warren
#

Will try later

frosty warren
# mental ibex try doing this, idk if it still works or not. it’s stupid but the only thing i c...
JEIAddedEvents.registerRecipeCatalysts(event => {
    event.data.addRecipeCatalyst["net.minecraft.world.item.ItemStack","mezz.jei.api.recipe.RecipeType[]"](Item.of("create:depot"), [global.depotCraftingType])
})

Now it's this:

[15:13:11] [ERROR] ! jei_categories/depot_crafting.js#157: Error in 'JEIAddedEvents.registerRecipeCatalysts': TypeError: Cannot find function mezz.jei.api.recipe.RecipeType[] in object Function.

mental ibex
#

ffffff

#

yea idk man. this javascript to java stuff is a pita

#

and no access to java reflection

#

idk how you're going to turn RecipeType into RecipeType[] when [RecipeType] turns into an object 🤦‍♂️

#

well last idea

#
const $Array = Java.loadClass('java.util.Arrays');
// then
event.data.addRecipeCatalyst(Item.of("create:depot"), $Array.asList(global.depotCraftingType).toArray());
// or
event.data.addRecipeCatalyst(Item.of("create:depot"), $Array.asList([global.depotCraftingType]).toArray())
#

and if that doesn't work...

const $RecipeType = Java.loadClass('net.minecraft.world.item.ItemStack","mezz.jei.api.recipe.RecipeType');
// then
event.data.addRecipeCatalyst(Item.of("create:depot"), new $RecipeType[] { global.depotCraftingType });
#

and if that doesn't work, give up

frosty warren
mental ibex
#

what? then you pinged him again lol - he has nothing to do with this…

#

the issue is obvious

#

me and Lytho both know that

#

did you even try what was given last?

#

@frosty warren

#

it also has nothing to do with jei either, it’s some weirdness happening within rhino at this point.

#

anyways i’m done, and won’t be here when Lytho comes 😂

not much either of us can do

frosty warren
compact egretBOT
#

Paste version of client.log from @frosty warren

mental ibex
#

I gave you more than one thing to try

#

you tried last and ignored rest

#

i knew that likely wouldn’t have

mental ibex
#

i figured out how signature casting worked again. you can also re-try this, otherwise i’m all out of options for you. just don’t forget the other options above

event.data.addRecipeCatalyst["net.minecraft.world.item.ItemStack, mezz.jei.api.recipe.RecipeType[]"](Item.of("create:depot"), [global.depotCraftingType])
#

but ^ shouldn’t be ambiguous anymore