How can I connect IInteractionObject with my Gui?
My target is to open gui (with no container) through clicking on entity and I want to make it compatible both with client and server side.
I have my gui registred in this way in the main mod file
ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.GUIFACTORY, ()->GuiOldMan::new);
At first I tried to make my GuiOldMan implements IInteractionObject but the whole gui is client side only so it didn't work for the server.
I am trying to open Gui using
NetworkHooks.openGui((EntityPlayerMP) player, new GuiOldMan());
I've been also trying to make separate object that implements IInteractionObject, but I don't know how to connect this object with gui.
Thanks in Advance!