Beispiel #1
0
  /** Adds the buttons (and other controls) to the screen in question. */
  public void initGui() {
    this.field_146628_f = I18n.format("selectWorld.title", new Object[0]);

    try {
      this.func_146627_h();
    } catch (AnvilConverterException var2) {
      logger.error("Couldn\'t load level list", var2);
      this.mc.displayGuiScreen(new GuiErrorScreen("Unable to load worlds", var2.getMessage()));
      return;
    }

    this.field_146637_u = I18n.format("selectWorld.world", new Object[0]);
    this.field_146636_v = I18n.format("selectWorld.conversion", new Object[0]);
    this.field_146635_w[WorldSettings.GameType.SURVIVAL.getID()] =
        I18n.format("gameMode.survival", new Object[0]);
    this.field_146635_w[WorldSettings.GameType.CREATIVE.getID()] =
        I18n.format("gameMode.creative", new Object[0]);
    this.field_146635_w[WorldSettings.GameType.ADVENTURE.getID()] =
        I18n.format("gameMode.adventure", new Object[0]);
    this.field_146635_w[WorldSettings.GameType.SPECTATOR.getID()] =
        I18n.format("gameMode.spectator", new Object[0]);
    this.field_146638_t = new GuiSelectWorld.List(this.mc);
    this.field_146638_t.registerScrollButtons(4, 5);
    this.func_146618_g();
  }
Beispiel #2
0
 public static int survivalId() {
   return WorldSettings.GameType.SURVIVAL.func_77148_a();
 }