Being able to change the opened state for a player is a big step forwards.
What would be great is if there was an event fired when the player opened state changes, either by opening or closing an interface.
Not only would this be useful in a number or normal situations, but it would also finally allow people to set up their own on-click GUI for custom entities by detecting the entity being opened and then immediately closing the entity in order to show their custom GUI.
on_player_opened_changed
Re: on_player_opened_changed
I've added on_gui_opened and on_gui_closed events for 0.16. The closed event has a few special cases to it in that it won't fire if the thing opened is closed as a result of it being destroyed - it's only fired when the player or mod explicitly closes the GUI.
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: on_player_opened_changed
One tick handler less. Awesome ![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.