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

Most Lua entity data fields are lost at shutdown #2547

Closed
Echoes91 opened this issue Mar 24, 2015 · 2 comments
Closed

Most Lua entity data fields are lost at shutdown #2547

Echoes91 opened this issue Mar 24, 2015 · 2 comments
Labels
Not a bug The behaviour is working as intended and won't be changed.

Comments

@Echoes91
Copy link

As an example, arrows are Lua entities with speed, acceleration and chance to break stored inside. Across a server reboot while an arrow is flying only speed is retained, acceleration goes to 0,0,0 (the arrow goes straight) and the rest becomes nil (causing crashes). Is there a reason for it or any way to keep other (constant) values too?

@ShadowNinja
Copy link
Member

get_staticdata() and on_activate(static_data) are supposed to be used to store and set this information since not everything stored in an entity's definition is supposed to be preserved through block loads. If the velocity is stored automatically the acceleration should probably be stored too though.

@Wuzzy2
Copy link
Contributor

Wuzzy2 commented Jun 26, 2015

Close this issue as “not a bug”?
Btw: Maybe the documentation needs to be clarified, it also took me some time to realize the importance of using the staticdata stuff.

@est31 est31 added the Not a bug The behaviour is working as intended and won't be changed. label Aug 31, 2015
@est31 est31 closed this as completed Aug 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Not a bug The behaviour is working as intended and won't be changed.
Projects
None yet
Development

No branches or pull requests

4 participants