KubeJS (Old)

KubeJS (Old)

3M Downloads

[KJS 7.2] Something broke equality check of ItemStack?

pietro-lopes opened this issue ยท 1 comments

commented

Minecraft Version

1.21.1

KubeJS Version

2101.7.2-build.286

Rhino Version

2101.2.7-build.81

Architectury Version

NA

Forge/Fabric Version

NeoForge 21.1.209

Describe your issue

ServerEvents.recipes(event => {
  let apple = Item.of("apple")
  let someNonSense = {"someKey": 12345}
  
  if (apple == someNonSense) {
    console.log("???")
  } else {
	  console.log("Not equal")
  }
})

the code simple breaks at equality check

Error in 'ServerEvents.recipes': Failed to read sized item stack from {someKey: 12345.0}: No key id in MapLike[{someKey=12345.0}]

Crash report/logs

No response

commented

Fixed