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

Drawers punchable from arrows #30

Open
trainwrecktony opened this issue May 3, 2019 · 2 comments
Open

Drawers punchable from arrows #30

trainwrecktony opened this issue May 3, 2019 · 2 comments
Labels

Comments

@trainwrecktony
Copy link

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

@lnjX
Copy link
Collaborator

lnjX commented May 3, 2019

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 lnjX added the bug label May 3, 2019
@The4codeblocks
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants