mt-mods / pipeworks

Pipeworks is a mod for Minetest allowing the crafting and usage of pipes and tubes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crash in MCL when deployer contains food items

nonfreegithub opened this issue · comments

steps to reproduce:

  • put in a deployer any food item (example a potato)
  • give to deployer a redstone signal

server crashs

ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod '' in callback environment_Step(): ...t/bin/../games/MineClone2/mods/PLAYER/mcl_hunger/api.lua:18: attempt to call method 'get_meta' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: 	...t/bin/../games/MineClone2/mods/PLAYER/mcl_hunger/api.lua:18: in function 'get_hunger'
ERROR[Main]: 	...in/../games/MineClone2/mods/PLAYER/mcl_hunger/hunger.lua:41: in function 'on_place'
ERROR[Main]: 	.../minetest/bin/../mods/pipeworks/wielder.lua:439: in function 'act'
ERROR[Main]: 	.../minetest/bin/../mods/pipeworks/wielder.lua:126: in function 'wielder_on'
ERROR[Main]: 	.../minetest/bin/../mods/pipeworks/wielder.lua:162: in function 'action_on'
ERROR[Main]: 	...mes/MineClone2/mods/ITEMS/REDSTONE/mesecons/internal.lua:203: in function <...mes/MineClone2/mods/ITEMS/REDSTONE/mesecons/internal.lua:196>
ERROR[Main]: 	.../MineClone2/mods/ITEMS/REDSTONE/mesecons/actionqueue.lua:97: in function 'execute'
ERROR[Main]: 	.../MineClone2/mods/ITEMS/REDSTONE/mesecons/actionqueue.lua:86: in function <.../MineClone2/mods/ITEMS/REDSTONE/mesecons/actionqueue.lua:63>
ERROR[Main]: 	.../minetest/bin/../builtin/common/register.lua:26: in function <.../minetest/bin/../builtin/common/register.lua:12>
commented

Looking at the stack trace sounds like issue with MCL hunger, it should check if player is actually online and is real player.

Yep, there's only a useless is_player() check: (which returns true for fake players too) https://git.minetest.land/MineClone2/MineClone2/src/branch/master/mods/PLAYER/mcl_hunger/hunger.lua#L5-L7