#Unsure why this code isnt working, no errors logged.

20 messages · Page 1 of 1 (latest)

hallow jewel
#

pls halp

ServerEvents.recipes((event) => {
event.shapeless(
Item.of('minecraft:glass_bottle'),
['1x tfc:volcanic_glass_bottle']
)
event.shapeless(
Item.of('minecraft:glass_bottle'),
['1x tfc:hematitic_glass_bottle']
)
event.shapeless(
Item.of('minecraft:glass_bottle'),
['1x tfc:olivine_glass_bottle']
)
event.shapeless(
Item.of('minecraft:glass_bottle'),
['1x tfc:silica_glass_bottle']
)
})

maiden duneBOT
#

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

chilly baneBOT
#

You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send it if asked, as it contains helpful information.

frigid zenith
#

Post your log and let's have a look

hallow jewel
#

[15:51:08] [INIT] KubeJS 2001.6.5-build.7; MC 2001 forge
[15:51:08] [INIT] Loaded plugins:
[15:51:08] [INIT] - dev.latvian.mods.kubejs.forge.BuiltinKubeJSForgePlugin
[15:51:08] [INIT] - dev.latvian.mods.kubejs.forge.BuiltinKubeJSForgeClientPlugin
[15:51:08] [INIT] - pie.ilikepiefoo.AdditionsPlugin
[15:51:08] [INIT] - pie.ilikepiefoo.compat.jei.JEIKubeJSPlugin
[15:51:08] [INIT] - com.notenoughmail.kubejs_tfc.KubeJSTFCPlugin
[15:51:08] [INIT] - com.notenoughmail.kubejs_tfc.addons.firmalife.FirmaLifePlugin
[15:51:08] [INIT] - com.notenoughmail.kubejs_tfc.addons.precpros.PrecProsPlugin
[15:51:08] [INIT] - com.notenoughmail.kubejs_tfc.addons.afc.AFCPlugin
[15:51:08] [INIT] - com.notenoughmail.kubejs_tfc.addons.tfccc.TFCCCPlugin
[15:51:08] [INIT] - com.probejs.ProbeJSPlugin
[15:51:08] [INFO] example.js#5: Hello, World! (Loaded server scripts)
[15:51:08] [INFO] Loaded script server_scripts:example.js in 0.0 s
[15:51:08] [INFO] Loaded 1/1 KubeJS server scripts in 0.005 s with 0 errors and 0 warnings
[15:51:08] [INFO] Scripts loaded
[15:51:13] [INFO] Server resource reload complete!

frigid zenith
#

Hmm, there only seems to be one script and it's printing hello world which isn't in the code you sent

chilly baneBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:
Note that these are backticks, not apostrophes

```js :arrow_left:

ServerEvents.recipes(event => {
event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})

``` :arrow_left:

This example will look like this:

ServerEvents.recipes(event => {
  event.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
frigid zenith
#

Send your entire file

hallow jewel
#

Okay!

#

Is there a way I have to specifically initialise the script to make it work?, I literally just wrote the JS file and stuck it in the right folder

frigid zenith
#

That should be okay, but kubejs isn't even detecting it, did you use /reload or relaunch the game at all?

hallow jewel
#

yep!

chilly baneBOT
#

Paste version of BottledAir.Js from @hallow jewel

gilded gale
#

Why is the J in .js capitalized?
I don't know if that would affect it, but I would susspect it does. Gnome doesn't even do the syntax highlighting with it capitalized.

frigid zenith
#

Oh yea... Make sure all file extensions are lowercase

#

The code lgtm

#

Mind showing us the file path if changing the extension from .Js to .js

hallow jewel
#

that worked..

#

damnit