Package logisticspipes.interfaces

Examples of logisticspipes.interfaces.IHUDConfig


  }

  @Override
  public void processPacket(EntityPlayer player) {
    if(player.inventory.getStackInSlot(slot) == null) return;
    IHUDConfig config = new HUDConfig(player.inventory.getStackInSlot(slot));
    switch(buttonId) {
      case 0:
        config.setHUDChassie(state);
        if(config.isHUDChassie()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.chassie.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.chassie.disabled"));
        }
        break;
      case 1:
        config.setHUDCrafting(state);
        if(config.isHUDCrafting()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.crafting.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.crafting.disabled"));
        }
        break;
      case 2:
        config.setHUDInvSysCon(state);
        if(config.isHUDInvSysCon()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.invsyscon.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.invsyscon.disabled"));
        }
        break;
      case 3:
        config.setHUDPowerJunction(state);
        if(config.isHUDPowerLevel()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.powerjunction.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.powerjunction.disabled"));
        }
        break;
      case 4:
        config.setHUDProvider(state);
        if(config.isHUDProvider()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.provider.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.provider.disabled"));
        }
        break;
      case 5:
        config.setHUDSatellite(state);
        if(config.isHUDSatellite()) {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.satellite.enabled"));
        } else {
          player.addChatComponentMessage(new ChatComponentTranslation("lp.hud.config.satellite.disabled"));
        }
        break;
View Full Code Here


      lastYPos = player.posY;
      lastZPos = player.posZ;
    }
    boolean cursorHandled = false;
    displayCross = false;
    IHUDConfig config;
    if(debugHUD == null) {
      config = new HUDConfig(mc.thePlayer.inventory.armorInventory[3]);
    } else {
      config = new IHUDConfig() {
        @Override public boolean isHUDSatellite() {return false;}
        @Override public boolean isHUDProvider() {return false;}
        @Override public boolean isHUDPowerLevel() {return false;}
        @Override public boolean isHUDInvSysCon() {return false;}
        @Override public boolean isHUDCrafting() {return false;}
View Full Code Here

  @SuppressWarnings("unchecked")
  @Override
  public void initGui() {
    super.initGui();
    if(player.inventory.getStackInSlot(slot) != null) {
      IHUDConfig config = new HUDConfig(player.inventory.getStackInSlot(slot));
      this.buttonList.add(new GuiCheckBox(0, guiLeft + 30, guiTop +  10, 12, 12, config.isHUDChassie()));
      this.buttonList.add(new GuiCheckBox(1, guiLeft + 30, guiTop +  30, 12, 12, config.isHUDCrafting()));
      this.buttonList.add(new GuiCheckBox(2, guiLeft + 30, guiTop +  50, 12, 12, config.isHUDInvSysCon()));
      this.buttonList.add(new GuiCheckBox(3, guiLeft + 30, guiTop +  70, 12, 12, config.isHUDPowerLevel()));
      this.buttonList.add(new GuiCheckBox(4, guiLeft + 30, guiTop +  90, 12, 12, config.isHUDProvider()));
      this.buttonList.add(new GuiCheckBox(5, guiLeft + 30, guiTop + 110, 12, 12, config.isHUDSatellite()));
    } else {
      this.closeGui();
    }
  }
View Full Code Here

TOP

Related Classes of logisticspipes.interfaces.IHUDConfig

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.