Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing Array into Ingredient.of disconnects players instantly upon join #867

Open
MundM2007 opened this issue Jul 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MundM2007
Copy link

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

@MundM2007 MundM2007 added the bug Something isn't working label Jul 11, 2024
@MundM2007
Copy link
Author

replacing the Ingredient.of with InputItem.of fixes this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant