Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async mapgen environment: get_gen_notify is nil #14540

Closed
MisterE123 opened this issue Apr 12, 2024 · 2 comments · Fixed by #14568
Closed

Async mapgen environment: get_gen_notify is nil #14540

MisterE123 opened this issue Apr 12, 2024 · 2 comments · Fixed by #14568
Labels
Feature request Issues that request the addition or enhancement of a feature @ Mapgen @ Script API

Comments

@MisterE123
Copy link
Contributor

Minetest version

Minetest 5.9.0-dev-7e7a14a-dirty

Irrlicht device

No response

Operating system and version

n/a (windows)

CPU model

No response

GPU model

No response

Active renderer

No response

Summary

When calling minetest.get_gen_notify() in the async mapgen environment, you get attempt to call field 'get_gen_notify' (a nil value)

Steps to reproduce

biomegen-mglua-refactor.zip
luamap.zip
mandeland.zip

The above mod is an attempt to port biomegen to the async environment. To reproduce, run the trio of mods uploaded here. luamap and mandeland are modified to use the async environment.

In biomegen, see mapgen.lua. At line 42, in function initialize_biome_data(), at line 47, minetest.get_gen_notify() is called and causes a nil value error (minetest.get_gen_notify() does not exist)

To make biomegen run anyways without erroring, comment out lines 47 - 62.

@MisterE123 MisterE123 added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Apr 12, 2024
@sfan5 sfan5 added Feature request Issues that request the addition or enhancement of a feature and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Apr 15, 2024
@sfan5
Copy link
Member

sfan5 commented Apr 15, 2024

No get_gen_notify is indeed just an omission.
But I can tell you that the approach the code you linked takes has to be reworked quite a bit to work with mapgen threading: It overrides engine functions like get_mapgen_object to instead provide its own data. But this has to happen in the main environment instead, so getting the data there is not that trivial anymore.

@MisterE123
Copy link
Contributor Author

I think gael's solution, rather than porting biomegen, was to make the PR for minetest.generate_biomes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Issues that request the addition or enhancement of a feature @ Mapgen @ Script API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants