KubeJS (Old)

KubeJS (Old)

3M Downloads

Passing Array into Ingredient.of disconnects players instantly upon join

MundM2007 opened this issue ยท 1 comments

commented

Minecraft Version

1.20.1

KubeJS Version

kubejs-forge-2001.6.5-build.14.jar

Rhino Version

rhino-forge-2001.2.2-build.18.jar

Architectury Version

architectury-9.2.14-forge.jar

Forge/Fabric Version

47.3.1

Describe your issue

When using this code

ServerEvents.recipes(event => {
   Ingredient.of(["kubejs:iron_hammer","kubejs:steel_hammer"])
})

(the items are custom damagable items created with kjs, idk if it also happens with other items)
on a server, players are instantly disconnected. On Singelplayer this code works without problem, even in a recipe.
the only error given in the log is this one and only logged throught the Connectivity Mod

[24Jun2024 11:37:52.652] [Netty Client IO #1/WARN] [com.connectivity.Connectivity/]: Packet data:
{
  "f_132075_": "translation{key='disconnect.genericReason', args=[Internal Exception: io.netty.handler.codec.DecoderException: com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonArray; at path $]}"
}

this is the error message given to the players:
image

Crash report/logs

No response

commented

replacing the Ingredient.of with InputItem.of fixes this