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

placing a sapling without default mod fails #45

Closed
2 tasks
BuckarooBanzay opened this issue Sep 6, 2024 · 4 comments · Fixed by #46
Closed
2 tasks

placing a sapling without default mod fails #45

BuckarooBanzay opened this issue Sep 6, 2024 · 4 comments · Fixed by #46
Labels
bug Something isn't working

Comments

@BuckarooBanzay
Copy link
Member

BuckarooBanzay commented Sep 6, 2024

Still calls the default.sapling_on_place function from default: https://github.com/minetest/minetest_game/blob/master/mods/default/trees.lua#L455

2024-09-06 21:35:18: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'moretrees' in callback item_OnPlace(): /home/user/.minetest/mods/moretrees/node_defs.lua:508: attempt to index global 'default' (a nil value)
2024-09-06 21:35:18: ERROR[Main]: stack traceback:
2024-09-06 21:35:18: ERROR[Main]: 	/home/user/.minetest/mods/moretrees/node_defs.lua:508: in function </home/user/.minetest/mods/moretrees/node_defs.lua:507>

Call places:

itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,

itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,

Possible solutions:

  • embed/import the function in this mod
  • embed/import the function in the xcompat mod
@BuckarooBanzay BuckarooBanzay added the bug Something isn't working label Sep 6, 2024
@wsor4035
Copy link
Contributor

wsor4035 commented Sep 6, 2024

someone no idea who should have removed https://github.com/mt-mods/moretrees/blob/master/README.md?plain=1#L11 in there pr as well

@BuckarooBanzay
Copy link
Member Author

BuckarooBanzay commented Sep 6, 2024

no big deal, i'm playing around with non-default worlds and other than that it looks good

i can do the code-part, i just need a decision :)

@wsor4035
Copy link
Contributor

wsor4035 commented Sep 6, 2024

already implementing a solution in xcompat/src/functions.lua

@wsor4035 wsor4035 linked a pull request Sep 6, 2024 that will close this issue
@wsor4035
Copy link
Contributor

wsor4035 commented Sep 6, 2024

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants