#KubeJS Crash when starting world when adding any worldgen structure_set

73 messages · Page 1 of 1 (latest)

sick drift
#

how to reproduce:
grab any valid structure_set and add any of those:

  • low priority data on server event
  • high priority data on server event
  • data folder to act as datapack

example below from original minecraft files

{
  "placement": {
    "type": "minecraft:random_spread",
    "salt": 20083232,
    "separation": 8,
    "spacing": 24
  },
  "structures": [
    {
      "structure": "minecraft:ancient_city",
      "weight": 1
    }
  ]
}

https://pastebin.com/TfzTQspv

vestal meadowBOT
#

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

rose plank
sick drift
#

is this Github issue report now? 🦋

midnight coyote
#

the error is pretty obvious..

#

Input does not contain a key [type]

#

add a type key

#

no idea why base mc doesnt have that, but it should

#

"type": "minecraft:jigsaw" is probably the type you want

rose plank
#

what's with your username? worry

midnight coyote
#

its fine

sick drift
midnight coyote
#

oh

#

hm

#

ohh

#

i remember this

#

i think

hybrid arrow
rose plank
#

huh

sick drift
hybrid arrow
#

the username doesn't work like that bigbrain

rose plank
#

I was just trying to ask why does it have all of that formatting in the first place

sick drift
#

@midnight coyote when I debug at the RegistryDataLoader it is guessing this is structure, hence why it asks for type, but I have absolutely no IDEA why, all path are correct, and look at this from the error:

#

Errors in registry minecraft:worldgen/structure:

Errors in element minecraft:set/ancient_cities:
java.lang.IllegalStateException: Failed to parse minecraft:worldgen/structure_set/ancient_cities.json from

looks like it parsed weirdly the structure_set

#

it broke

midnight coyote
#

yeah

#

i think kubejs is doing a _ -> / conversion

#

if you turn on dataPackOutput it should log the id

sick drift
#

i remember debugin that file that manages it, it was fine until there I guess

midnight coyote
#

reeee i remember getting this error at some point, but cant find anything from back then

sick drift
#

worldgen/structure =/

midnight coyote
#

i cant find anything in the kjs code that would replace _ with /

#

like this is all the code in kjs that uses .replace

sick drift
#

🥶

midnight coyote
#

do open a github issue

#

and i cant find anything in any code in my dev env that uses that method to replace _ with /

sick drift
hybrid arrow
rose plank
#

chief does heh

rose plank
#

like I said heh

midnight coyote
#

theres a few things doing / -> _ conversion, but nothing at all doing it the other way.
this is very strange

are you sure that data folder acting as the data folder in a datapack doesnt work? i was using it a couple days ago and im pretty sure it was working for me

sick drift
#

it works for other stuff, not for structure_set lol, maybe others that contains _ also suffer from this?

midnight coyote
#

try tags/entity_type

sick drift
#

🙏

#

or not? pepethink

#

no, I'm back to minecraft territory

sick drift
#

happens to noise_settings too

sick drift
#

@glad pine

glad pine
#

does it cut the string after _?

sick drift
glad pine
#

if placed in data folder

sick drift
#

kubejs/data/minecraft/worldgen/structure_set/ancient_cities.json

glad pine
#

There's logGeneratedData config in local/kubejs/dev.properties

sick drift
glad pine
#

I think I know what's happening

#

I do path.startsWith(filter)

#

but worldgen/structure_set/ancient_cities.json starts with worldgen/structure

#

so I pretty much just gotta change path.startsWith(filter + "/")

glad pine
#

@sick drift update that fixes it released

sick drift
#

👏👏👏👏👏👏