drawers icon indicating copy to clipboard operation
drawers copied to clipboard

Drawers punchable from arrows

Open trainwrecktony opened this issue 5 years ago • 2 comments

Not sure if feature or bug. Became problem on my server as i have the animals_modpack npc archer gaurd and its arrows cause a crash 2019-05-02 22:26:38: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback luaentity_Step(): Runtime error from mod '' in callback luaentity_Punch(): C:\test\bin\..\games\twt\mods\drawers/lua/visual.lua:187: attempt to index local 'inv' (a nil val 2019-05-02 22:26:38: ERROR[Main]: ue) 2019-05-02 22:26:38: ERROR[Main]: stack traceback: 2019-05-02 22:26:38: ERROR[Main]: C:\test\bin\..\games\twt\mods\drawers/lua/visual.lua:187: in function <C:\test\bin\..\games\twt\mods\drawers/lua/visual.lua:171> 2019-05-02 22:26:38: ERROR[Main]: [C]: in function 'punch'

A players arrows using the throwing mod are able to take items from drawer without crash

trainwrecktony avatar May 03 '19 14:05 trainwrecktony

This is was definitely my intention with this mod - only features, no bugs.

But basically the arrow is just executing "on_punch" of the drawer visual (as the player does with a leftclick). You could add a check to the leftclick-action, so it is only executed, if the puncher is a player.

lnjX avatar May 03 '19 22:05 lnjX

This is was definitely my intention with this mod - only features, no bugs.

But basically the arrow is just executing "on_punch" of the drawer visual (as the player does with a leftclick). You could add a check to the leftclick-action, so it is only executed, if the puncher is a player.

Nice, keep it in, keep it as feature.

The4codeblocks avatar Nov 03 '22 19:11 The4codeblocks