Package logisticspipes.network.abstractguis

Examples of logisticspipes.network.abstractguis.GuiProvider


    int currentid = 0;

    for (ClassInfo c : classes) {
      final Class<?> cls = c.load();
      final GuiProvider instance = (GuiProvider) cls.getConstructors()[0].newInstance(currentid);
      guilist.add(instance);
      guimap.put((Class<? extends GuiProvider>) cls, instance);
      currentid++;
    }
  }
View Full Code Here


 
  @SneakyThrows(IOException.class)
  @SideOnly(Side.CLIENT)
  public static void openGui(GUIPacket packet, EntityPlayer player) {
    int guiID = packet.getGuiID();
    GuiProvider provider = guilist.get(guiID).template();
    provider.readData(new LPDataInputStream(packet.getGuiData()));
    GuiContainer screen;
    try {
      screen = (GuiContainer) provider.getClientGui(player);
    } catch(Exception e) {
      LogisticsPipes.log.error(packet.getClass().getName());
      LogisticsPipes.log.error(packet.toString());
      throw new RuntimeException(e);
    }
View Full Code Here

TOP

Related Classes of logisticspipes.network.abstractguis.GuiProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.