#KubeJS and EpicKnightsMod (magistruarmory) default recipe crash

52 messages · Page 1 of 1 (latest)

twilit vortex
#

I'm trying to create a modpack with the 2 of them and when I try to launch singleplayer, I'm getting

[09Feb2025 20:19:58.539] [Netty Server IO #1/ERROR][net.minecraft.network.Connection/]: Exception caught in connectionio.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:update_recipes'

I've isolated this mod as a cause, or rather interaction between the mod and KubeJS, since:

  1. The logs indicate that some recipes are messed up
  2. After seeing the logs I tested that either disabling KubeJS or EpicKnightsMod makes the game run normally
  3. After tests I've isolated these 2 (and their libs + jei) and they still don't work together

I'm making this post asking for help if there is something obvious I'm not seeing in the logs that could help fix that or if somebody experienced something similar with other mod and knows a solution since:

  • Removing all recipes makes it so you can launch a game
  • But removing all recipes from magistruarmory doesn't help.
    I guess it also might potentially might be a bug? Even though it's another mod it doesn't load it's recipes or do changes like KubeJS. (EpicKnightsMod just adds items and models, at least at first glance).

Logs are in file.
Script if it helps? - like the script isn't really the issue, script helps it
KubeJS/server_scripts/main.js:

// Visit the wiki for more info - https://kubejs.com/
// console.info("Hello, World! (Loaded server example script)");
ServerEvents.recipes((event) => {
  console.log("Hello! The recipe event has fired!");
  // event.remove({ id: "magistuarmory:steel_ingot_blasting" });
  // event.remove({ id: "magistuarmory:barbedclub" });
  // event.remove({ id: "magistuarmory:blacksmith_hammer" });
  // event.remove({ id: "magistuarmory:pitchfork" });
  // event.remove({ mod: "magistuarmory" });
  event.remove({});
});

In the meantime I will try to come up with something on my own.

vale egretBOT
#

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

hasty gateBOT
#

Paste version of latest.log from @twilit vortex

twilit vortex
#

Forgot, when I enter the world after disabling recipes these errors pop up

twilit vortex
#

A new development:
I've created a mock datapack that supplies these 4 recipes (not these items but just supplies 4 valid recipes under these names) and it started working (even though the pack is disabled and even not present on new worlds).
When I tried the solution with all mods, the issue is still there though.

Yup, on isoloted case doing:

  • adding datapack to world (running or not)
  • enabling and reloading datapack
  • removing event.remove({}); line
  • reloading kubejs
  • reloading datapacks
    fixes it, despite the recipes being broken

But if more mods come to play the issue still stands

twilit vortex
hasty gateBOT
#

Paste version of server.log from @twilit vortex

vapid hemlock
#

I have encountered this situation before. It seems to be caused by the mod author not updating the recipe format. You can try to modify its format to the correct one in the data pack.
It's usually here:

        "id": "knightquest:cleaver"
    },
feral wolf
#

This seems like a mod error

#

Nothing we can really do

#

Report it to the mod author or make a pull on GH to fix it

twilit vortex
#

Already did report it

twilit vortex
#

But there is still one thing that bothers me

#

When I try only Epic Knight's mod and KubeJS

#

Then datapack, removing all recipes or removing these 4 recipes that throw an error solve the problem

#

But with my target modpack that I want to work on only removing all recipes works for some reason

#

And disabling the troublemaker mod solves it too

#

So it isn't other mods

#

It's really strange

#

But I think I got an idea?

#

Epic Knights mod interacts with mods that add their own metals and I'm using Immersive Engineering with it's own steel, maybe if I add that into the mix (even though there are no errors with IE) it will still crash

#

Then I'll troubleshoot from there

twilit vortex
#

Can I make a script run after data packs are loaded?

twilit vortex
#

Other than that I guess I'm on my own with that, but I will be checking tags and if I find something I will just give updates here

#

And close it if I close it or give up

#

And at the end I will do a summary if somebody will run into the same issue

twilit vortex
#

Ok I just did a typo in datapack dir

#

~~# Summary

The problem: Broken recipes in another mod or [Netty Server IO #1/ERROR][net.minecraft.network.Connection/]: Exception caught in connectionio.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:update_recipes' 1.21.1

If you are getting such error message when joining the world:
Create a datapack that fixes the problem.
Worked for me.
Make sure you don't do any typos in recipe directories, resource locations all files etc etc, for me the issue was I named magistuarmormy as magistrarmory which could save me 1 day of work.
Hope you will find this message when filtering posts.

Also if one mod is having the issue and you fix it, then get the issue again - it's most likely of the typo.
Immersive Engineering in my case created another issue most likely because it has Assembler - auto crafter that has it's recipes. Removing the recipes didn't really fix the issue since it added it's own faulty recipes.

Aaaaaand if you think you fixed the thing with datapack, can join world and still get errors on chat - TYPO, issue is still there KubeJS just weirded out and let you in for some reason.~~

twilit vortex
#

Wrote too soon, only error disappears, still got the issue

#

Sorry I'm just tired by this problem

feral wolf
twilit vortex
#

Well still haven't come up with anything about the IE, Epic Knights and KubeJS issue that I'm having

#

Unless you're talking about Epic Knight's mod broken recipes

#

then my problem is that I can't find their repo for 1.21, they have branches in their repo for 1.20 and 1.16

#

I just made the post on their discord

#

Also

#

I directly modified the jar archive of the mod

#

for testing

#

and

twilit vortex
#

Removing all custom crafter recipes from IE doesn't work.
Removing IE recipes doesn't work
Removing Epic Knights recipes doesn't work
Removing both does work

#

I suppose the issue is in tags or there is some broken recipe that doesn't show up on the logs

#

And the stacktrace shows where in java code it is happening, that there is some empty Itemstack

#

but no clue which recipe can cause it

feral wolf
#

I have absolutely no idea what's going on here without seeing Epic Knight's code