#Access to datapack files?

7 messages · Page 1 of 1 (latest)

hidden hearth
#

Is it possible in kubejs to load/access values from kubejs/data/test/file.json ?

atomic dragonBOT
#

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

edgy rockBOT
#

Here's a simple snippet showing how to use JsonIO to read/write JSON files anywhere within the Minecraft folder:

// Reading the contents of the file from the given path
let config = JsonIO.read('kubejs/config/myawesomeconfig.json')

// Writing to an existing/new file
JsonIO.write('kubejs/config/myawesomeconfig.json', {settings: 'creeper', weirdblock: 'minecraft:end_gateway'})
half nexus
#

I think this could help

hidden hearth
#

let me try it again, though i tried it before and it didn't work

half nexus
#

I used it before, so I wonder how you're using it? Does it give errors?

hidden hearth
#

it works! Thanks, probbly made some mistake in past with path