#MoreJS | Recipe Catalyst error due to updated JEI formatting
47 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
Paste version of depot_crafting.js, client.log from @frosty warren
@tawny wind
why it should be a morejs thing? Its an error because of an ambiguous call
Please take a look at the errors first before pinging
The script became faulty after several JEI updates
sorry :(
I actually thought it would be this simple to fix, nevermind..
Paste version of depot_crafting.js, console.log from @frosty warren
L#157 [global.depotCraftingType]
make it an array and it should work
err and use Item.of("create:depot")
🥱good night
Did what you recommended me
Paste version of client.log, depot_craftingv2.js from @frosty warren
hmmm why did it convert to object
i would force cast that function lmfao
i just don’t recall how
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
Will try later
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.
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
@tawny wind 's comment at the top makes it seem as if it is obvious
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
This one gave me a syntax error
const $RecipeType = Java.loadClass('net.minecraft.world.item.ItemStack","mezz.jei.api.recipe.RecipeType');
JEIAddedEvents.registerRecipeCatalysts(event => {
event.data.addRecipeCatalyst(Item.of("create:depot"), new $RecipeType[] { global.depotCraftingType });
})
Paste version of client.log from @frosty warren
I gave you more than one thing to try
you tried last and ignored rest
i knew that likely wouldn’t have
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