Skip to content

fix: format #481

Merged
misode merged 14 commits intomcbeet:mainfrom
edayot:fix_format_2
Nov 29, 2025
Merged

fix: format #481
misode merged 14 commits intomcbeet:mainfrom
edayot:fix_format_2

Conversation

@edayot
Copy link
Contributor

@edayot edayot commented Oct 18, 2025

A try to format handeling, in the order what the pipeline does :

  • assign format to the latest (this is done in Pack.assign_format method, which is automatic at the class creation)
  • enter bootstrap
    • if there is a config that specify any format, it overwrite in the pack
    • if no config is found, it check for the minecraft version
    • runs the require section
    • runs the pipeline
    • process overlay format, since they can be created

@edayot edayot marked this pull request as draft October 18, 2025 08:08
@edayot edayot marked this pull request as ready for review October 19, 2025 09:16
@edayot edayot changed the title fix format fix: format Oct 19, 2025
@SpecialBuilder32
Copy link

It looks like this PR does fix the issues I was having with setting max_format in a plugin, and my builds working that is working now.

There does look to be some code for handling the new max_format and min_format in overlays, but I can't get the values set in beet.json to carry over to the pack.mcmeta after build. I tried scrying into the depths of beet but alas I am still not powerful enough. Do we need an @Property setter in beet\library\base\Pack perhaps to write the values to mcmeta? The primary pack uses PackPin's to access the values and ensure everything is synced with mcmeta, but overlays need some extra support maybe?

In my dive I also noticed alot of the pack merge code is missing max_format handling, but has handling for supported_formats. I'm not quite sure what happens to those fields under the current code and pack merging, but it may be worth taking a peek at, or at least being aware that it might be unsupported behavior.

assert a.overlay_parent is p

assert p == DataPack()
assert p != DataPack()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this i feel like it's better to not have them equal, p is a datapack that has an overlay, and a new datapck instance doesn't.

assert p != DataPack()
assert a == DataPack()
assert a == p
assert a != p
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here a is a fresh datapack and p contains the overlay

@misode
Copy link
Member

misode commented Nov 20, 2025

For some strange reason this PR causes the beet.contrib.worldgen default plugin to not initialize inside overlays. I haven't looked further into this, but wanted to let this be known.

Update: more likely, extend_namespace might not be working in overlays.

@edayot
Copy link
Contributor Author

edayot commented Nov 21, 2025

For some strange reason this PR causes the beet.contrib.worldgen default plugin to not initialize inside overlays. I haven't looked further into this, but wanted to let this be known.

Update: more likely, extend_namespace might not be working in overlays.

Yeah it wasn't working before, now the extend_namespace attribute is the same as the base datapack

Copy link
Member

@misode misode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is working fine for Gamemode 4 now, we can probably merge this soon.

@misode misode merged commit 07899be into mcbeet:main Nov 29, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants