@Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { for (IThirdParty thirdParty : thirdPartyMods) { if (thirdParty instanceof IGuiHandler) { Object obj = ((IGuiHandler) thirdParty).getServerGuiElement(ID, player, world, x, y, z); if (obj != null) return obj; } } return null; }
@Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { for (IThirdParty thirdParty : thirdPartyMods) { if (thirdParty instanceof IGuiHandler) { Object obj = ((IGuiHandler) thirdParty).getClientGuiElement(ID, player, world, x, y, z); if (obj != null) return obj; } } return null; }
@Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { IGuiHandler handler = registeredHandlers.get(ID); if (handler != null) { return handler.getServerGuiElement(ID, player, world, x, y, z); } return null; }
@Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { IGuiHandler handler = registeredHandlers.get(ID); if (handler != null) { return handler.getClientGuiElement(ID, player, world, x, y, z); } return null; }
public void registerGuiHandler(IGuiHandler handler, int guiID) { registeredHandlers.put(guiID, handler); }
public void setGuiHandler(IGuiHandler handler) { overrideGuiHandler = handler; }
public IGuiHandler getGuiHandler() { return overrideGuiHandler != null ? overrideGuiHandler : guiHandler; }
public static void registerGuiHandler(IGuiHandler handler) { NetworkRegistry.INSTANCE.registerGuiHandler(TeambattleReference.instance, handler); }
public static void addGuiHandler(Object mod, IGuiHandler handler) { NetworkRegistry.INSTANCE.registerGuiHandler(mod, handler); }
/**Register the gui handler with network registry under active mod container*/ public static final IGuiHandler guiHandler(IGuiHandler parGuiHandler) { NetworkRegistry.INSTANCE.registerGuiHandler(MCP.mod().getMod(), parGuiHandler); return parGuiHandler; }
@Override public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler) { return new ClientGuiHandler(modSpecificHandler); }
@Override public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler) { return new CommonGuiHandler(modSpecificHandler); }
public CommonGuiHandler(IGuiHandler wrappedHandler) { this.wrappedHandler = wrappedHandler; }
public ClientGuiHandler(IGuiHandler wrappedHandler) { super(wrappedHandler); }
public IGuiHandler wrapHandler(IGuiHandler modSpecificHandler);