#Pleast fix my code

10 messages · Page 1 of 1 (latest)

unborn crescent
#

I've been trying to change the recipe for the Gobber 2 ingot, and I've tried two different methods using ChatGPT, but neither of them works. Please review my code and provide feedback, as I don't know who else can help.

tough ventureBOT
#

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

ripe kelpBOT
#

Paste version of gobber2ingot.js from @unborn crescent

swift gyro
#

onEvent is 1.18.2 syntax, it's no longer supported beyond 1.18.2

#

Replace the line:

onEvent('recipes', event => {

with:

ServerEvents.recipes(event => {
#

Also - do not blindly trust AI, especially with KJS scripts

ripe kelpBOT
#

NEVER use any AI to generate KubeJS code. They currently know very little about it, and what they do know is often outdated or false. You can instead look at the KubeJS wiki or ask for help in #1047320998199955458 or #1254790121807548437.

coarse warren
#

Just wondering are you aware that a wiki exists for KubeJS?

swift gyro
#

And your AI is likely pulling that info exactly from that wiki:
https://kubejs.com/wiki
OK documentation for basics (like recipe events), but no documentation for Minecraft classes... yet

unborn crescent
#

Thank you so much, it works! Honestly Im not so good at English and coding so I'm using ChatGPT and a translator, and there's a lot of information on the wiki that I'm lost in, so I've been watching outdated guides on YouTube.