#Getting world data, is it possible?

1 messages · Page 1 of 1 (latest)

fallow gulch
#

I'm using a mod for getting player and world data. How can I access it through KubeJS?

shell arrowBOT
#

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

sharp tusk
#

can you explain what that command does

#

what do you want to implement

lament archBOT
#

The XY problem is when you really want to do X, and you think that Y can achieve X. However, you can't get Y to work, and so ask for help exclusively about Y.

This can lead to a lot of confusion from the people trying to help you, as Y can seem like a very random thing to want to do, and a lot of the time isn't the best way to achieve X anyway.

Its fine to ask about Y, just always include some context about X so you can be put on the right track if Y won't do X well, or there is an easier way to do X.

fallow gulch
# sharp tusk can you explain what that command does

so, @sharp tusk, i'm trying to access player variables* (of a mod: vault hunters, that is)*, the data is actually not in "playerdata", but in the "DimensionData", in minecraft:overworld"

the command i used is from a mod called "ServerDataAccessor" (i can send you the link if you want), and its accessing NBT data from my /world/ folder.

I've tried looking for other mods that get the player level/data, and I found some classes, I tried java, but it didn't work (i've also tried fixing that, even with some workarounds from this discord server, still no).

so, what I want is:

  • what is a good generic way of getting data from a given dimension?
#

now, alternatively, I could try (see "gambiarra") to get the text result of the command /the_vault vault_level get <playername> and try to parse the text to figure out the player level, but.. server.runCommand and server.runCommandSilent do not return text (and that makes sense), so this idea of mine just doesn't work.

dim halo
#

You dont need to use commands or even access nbt to get it

#

you can use the code in vault hunters to get it the same way they do

fallow gulch
#

how can I do that? in JS..?

#

i genuinely don't know

fallow gulch
dim halo
#

ugh the mods not open source

#

or at least the part that is, is very outdated

#
// at top of file
const $PlayerVaultStatsData = Java.loadClass('iskallia.vault.world.data.PlayerVaultStatsData')

// in the event
$$PlayerVaultStatsData.get(event.level).getVaultStats(event.player).vaultLevel

If the code has not changed in 3 years this is what it will be

fallow gulch
#

wow!

#

i will try this

fallow gulch
#

it worked like a charm..!