KubeJS

KubeJS

61M Downloads

Crash when adding a structure_set via Server Data events

TTFTCUTS opened this issue ยท 5 comments

commented

Minecraft Version

1.20.1

KubeJS Version

2001.6.4-build.120

Rhino Version

2001.2.2-build.18

Architectury Version

9.1.12

Forge/Fabric Version

NeoForge 47.1.83

Describe your issue

When adding worldgen data files via the data events, structure_set files appear to be being parsed as structure entries, in exactly the same manner as described in issue #708 - suggesting that while the issue was fixed for the data folder, it persists for event-created files.

The file mentioned here is being added via event.addJson("pack_ore_veins:worldgen/structure_set/ore_veins", json); in ServerEvents.highPriorityData:

Errors(s) loading registry minecraft:worldgen/structure:

Input does not contain a key [type]: MapLike[{"structures":[{"structure":"pack_ore_veins:gold_vein","weight":1}],"placement":{"type":"minecraft:random_spread","spacing":5,"separation":0,"salt":826401047}}]
	at: worldgen/structure 'pack_ore_veins:worldgen/structure_set/ore_veins.json'
	at: pack 'KubeJS Virtual Data Pack [high priority]'

latest.log

Crash report/logs

https://github.com/KubeJS-Mods/KubeJS/files/14120833/latest.log

commented

I'm also experiencing this bug and there is no sign its been seen via the discord, so I am adding my comment here it the hopes there can be some commentary

commented

Any progress on this one? Having same issue

commented

From Discord:

it is a bug, kjs is loading it as namespace:structure/set/stuff.json rather than namepsace:structure_set/stuff.json

I thought we fixed this ages ago ๐Ÿ™ƒ

commented

deleted my incorrect comment, guess it is a bug then

commented

I thought we fixed this ages ago ๐Ÿ™ƒ

Seems it was fixed for the actual data folder, (my initial tests were in there and worked totally fine) but it's definitely still happening when the files are put into the virtual datapack, as when I expanded it to make many different variants from an array of data it suddenly started failing.