Closed bengardner closed 2 years ago
As an update -- I dug into the minetest / default game code a bit and discovered that the issue is in the minetest default game.
The call minetest.place_node()
does not include the placer as a parameter. The on_place()
callbacks will always have a nil placer. I think that is the root bug.
The next layer bug is either in default.sapling_on_place() (trees.lua) or default.log_player_action().
default.sapling_on_place() checks placer for nil in a few places, but passes it to default.log_player_action().
default.log_player_action() doesn't check for nil.
This cannot be fixed in working_villagers without using a different place method.
I suppose this can be tagged as an upstream bug.
Hi. Thanks for using working_villages and for reporting an update about a bug source.
I try to reproduce that error in minetest game with tags 5.6.0 and 5.6.1. Without success. So I hope, this problem is not relevant to minetest game which is included in minetest installation.
I should have stated that I used working_villagers from contentdb. I did not use the version in git.
It looks like the issue was addressed a year ago in git in commit https://github.com/theFox6/working_villages/commit/abcc4bbb087e183c0cb5f5317061149ec17dc830
Describe the bug When a woodcutter places a sapling, the default game tries to log_player_action(), but player is nil.
To Reproduce Create a villager. Set the job to woodcutter. Toss it a sapling. Woodcutter places it. Crash.
Expected behavior The woodcutter places the sapling.
Log
Desktop (please complete the following information):
Mods activated:
Function that crashes (in default/functions.lua)
This is probably a bug in the Minetest default game. But maybe there is a way to provide a fake player.