Open BPR02 opened 5 days ago
This bug also occurs when using ctx.data
instead of ctx.inject(Document)
for the snapshot, so it's likely an issue with the way it handles snapshots and not with reading the markdown file (also indicated by the fact that lectern can properly generate the datapack from the markdown file).
With further testing and digging through the code, this seems to be a problem with worldgen directives in snapshots, regardless if they're in an overlay. Ran this sanity test which fails after generating the snapshot.
@data_pack pack.mcmeta
{
"pack": {
"pack_format": 48,
"description": ""
}
}
@dimension demo:demo
{
"type": "demo:in-the-base-pack",
"generator": {
"type": "minecraft:debug"
}
}
lectern v0.34.0 beet v0.108.5 pytest v8.3.3 pytest-insta v0.3.0
I'm trying to use lectern snapshots to test my WIP beet plugin, but it appears that overlays aren't properly working with directives for worldgen. Generating the markdown file works fine and generating a datapack from the markdown file also works fine, but when loading the snapshot, there is no overlay in the resulting
Document
object. Only the worldgen directives are broken. I explicitly tested the following which resulted in the error posted further down:This is my python test code, which is basically the same as bolt test
An example can be found in this branch. Running
pytest
will result in the error below. https://github.com/BPR02/Observer/tree/worldgenThe snapshot below is generated which is valid and can generate the correct datapack, but does not work when loaded as a snapshot.
Lectern snapshot
Data pack
@data_pack pack.mcmeta
demo
@dimension demo:foo
Overlay
overlay_48
@overlay overlay_48
demo
--VVV-- HERE IS THE ISSUE ----------------------------------
@dimension demo:demo
@endoverlay