/** Draws the screen and all the components in it. */
  public void drawScreen(int par1, int par2, float par3) {
    super.drawScreen(par1, par2, par3);

    if (field_74222_o) {
      displayDebuffEffects();
    }
  }
예제 #2
0
    @Override
    State carryOver(GuiContainer newContainer) {
      if (newContainer.getModel().equals(roadEnd.getRoad().getContainer())) {
        return this;
      }

      final Junction newJunction =
          newContainer.getModel().getJunction(roadEnd.getJunction().getNode());

      for (Road.End e : newJunction.getRoadEnds()) {
        if (e.isToEnd() && e.getWay().equals(roadEnd.getWay())) {
          return new IncomingActive(e);
        }
      }

      return new Default();
    }
  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    super.initGui();

    if (!mc.thePlayer.getActivePotionEffects().isEmpty()) {
      guiLeft = 160 + (width - xSize - 200) / 2;
      field_74222_o = true;
    }
  }
예제 #4
0
    @Override
    State carryOver(GuiContainer newContainer) {
      if (newContainer.equals(lane.getContainer())) {
        return this;
      }

      final Lane model = lane.getModel();
      final Junction newJunction =
          newContainer.getModel().getJunction(model.getOutgoingJunction().getNode());

      for (Road.End e : newJunction.getRoadEnds()) {
        if (e.isToEnd() && e.getWay().equals(model.getOutgoingRoadEnd().getWay())) {
          for (Lane l : e.getLanes()) { // e.getLane(...) can fail on lane removal
            if (l.getKind() == model.getKind() && l.getIndex() == model.getIndex()) {
              return new OutgoingActive(newContainer.getGui(l));
            }
          }

          break;
        }
      }

      return new Default();
    }