Attach GUI to SimpleEntityWithOwner?
Posted: Fri Mar 13, 2026 1:29 am
I have a mod that revolves around a SimpleEntityWithOwner at the core. Now I want to add a gui to it. The GUI is fully custom and works fine if I attach it e.g. to a container.
However, if I register to receive the on_gui_opened event for my custom entities, nothing happens. I never receive an event for that.
Can I attach a GUI to such an entity or only to entities that already have a GUI? If I can not attach a GUI, what would be a good replacement (I need four directions so the entity needs to be rotatable but other than that rather bare-bones, which is why SimpleEntityWithOwner was attractive).
Thanks for any pointers. I did not really find anything on the forum.
-h
However, if I register to receive the on_gui_opened event for my custom entities, nothing happens. I never receive an event for that.
Can I attach a GUI to such an entity or only to entities that already have a GUI? If I can not attach a GUI, what would be a good replacement (I need four directions so the entity needs to be rotatable but other than that rather bare-bones, which is why SimpleEntityWithOwner was attractive).
Thanks for any pointers. I did not really find anything on the forum.
-h