Package eu.ha3.matmos.game.data.modules

Examples of eu.ha3.matmos.game.data.modules.R__legacy_configvars


  private void whenUninitializedAction()
  {
    if (this.mod.isInitialized())
      return;
   
    TimeStatistic stat = new TimeStatistic();
    this.mod.initializeAndEnable();
    this.mod.getChatter().printChat(
      ChatColorsSimple.COLOR_BRIGHTGREEN, "Loading for the first time (" + stat.getSecondsAsString(2) + "s)");
  }
View Full Code Here


 
  private void whenWantsForcing()
  {
    if (!this.mod.isActivated() && this.mod.isInitialized())
    {
      TimeStatistic stat = new TimeStatistic();
      this.mod.reloadEverything();
      this.mod.activate();
      this.mod.getChatter().printChat(
        ChatColorsSimple.COLOR_BRIGHTGREEN, "Reloading expansions (" + stat.getSecondsAsString(2) + "s)");
    }
    else if (!this.mod.isInitialized())
    {
      whenUninitializedAction();
    }
View Full Code Here

    util().registerPrivateGetter("isJumping", EntityLivingBase.class, -1, "isJumping", "field_70703_bu", "bd");
    util().registerPrivateGetter("isInWeb", Entity.class, -1, "isInWeb", "field_70134_J", "J");
   
    ((OperatorCaster) op()).setTickEnabled(true);
   
    TimeStatistic timeMeasure = new TimeStatistic(Locale.ENGLISH);
    this.userControl = new UserControl(this);
    this.expansionManager =
      new ExpansionManager(new File(util().getModsFolder(), "matmos/expansions_r27_userconfig/"), this);
   
    // Create default configuration
    this.updateNotifier.fillDefaults(this.config);
    this.config.setProperty("world.height", 256);
    this.config.setProperty("dump.sheets.enabled", false);
    this.config.setProperty("start.enabled", true);
    this.config.setProperty("reversed.controls", false);
    this.config.setProperty("sound.autopreview", true);
    this.config.setProperty("globalvolume.scale", 1f);
    this.config.setProperty("key.code", 65);
    this.config.setProperty("useroptions.altitudes.high", true);
    this.config.setProperty("useroptions.altitudes.low", true);
    this.config.setProperty("useroptions.biome.override", -1);
    this.config.setProperty("debug.mode", 0);
    this.config.setProperty("minecraftsound.ambient.volume", 1f);
    this.config.commit();
   
    // Load configuration from source
    try
    {
      this.config.setSource(new File(util().getModsFolder(), "matmos/userconfig.cfg").getCanonicalPath());
      this.config.load();
    }
    catch (IOException e)
    {
      e.printStackTrace();
      throw new RuntimeException("Error caused config not to work: " + e.getMessage());
    }
   
    this.expansionManager.setVolumeAndUpdate(this.config.getFloat("globalvolume.scale"));
    resetAmbientVolume();
   
    this.updateNotifier.loadConfig(this.config);
   
    // This registers stuff to Minecraft (key bindings...)
    this.userControl.load();
   
    MAtLog.info("Took " + timeMeasure.getSecondsAsString(3) + " seconds to setup MAtmos base.");
   
    if (this.config.getBoolean("start.enabled"))
    {
      initializeAndEnable();
    }
View Full Code Here

      return;
   
    this.expansionManager.deactivate();
    this.expansionManager.dispose();
   
    TimeStatistic stat = new TimeStatistic(Locale.ENGLISH);
   
    this.dataGatherer = new ModularDataGatherer(this);
    this.dataGatherer.load();
    this.visualDebugger = new VisualDebugger(this, this.dataGatherer);
    this.expansionManager.setData(this.dataGatherer.getData());
    this.expansionManager.setCollector(this.dataGatherer);
    this.expansionManager.loadExpansions();
   
    this.hasResourcePacks = true;
    if (this.expansionManager.getExpansions().size() == 0)
    {
      MAtResourcePackDealer dealer = new MAtResourcePackDealer();
      if (dealer.findResourcePacks().size() == 0)
      {
        this.hasResourcePacks = false;
        this.hasDisabledResourcePacks = dealer.findDisabledResourcePacks().size() > 0;
      }
    }
   
    MAtLog.info("Expansions loaded (" + stat.getSecondsAsString(1) + "s).");
  }
View Full Code Here

  }
 
  @Override
  public void process()
  {
    TimeStatistic stat = new TimeStatistic();
    for (String requiredModule : this.iteratedThroughModules)
    {
      this.watch.reset();
      try
      {
        this.modules.get(requiredModule).process();
      }
      catch (Exception e)
      {
        e.printStackTrace();
        IDontKnowHowToCode.whoops__printExceptionToChat(this.mod.getChatter(), e, requiredModule.hashCode());
      }
      this.watch.stop();
      if (this.watch.getMilliseconds() > 50 && this.mod.isDebugMode())
      {
        MAtLog.warning("WARNING: Module " + requiredModule + " took " + stat.getMilliseconds() + "ms!!!");
      }
    }
   
    this.ticksPassed = this.ticksPassed + 1;
   
View Full Code Here

    gbc_lblSheet.insets = new Insets(0, 0, 5, 5);
    gbc_lblSheet.gridx = 0;
    gbc_lblSheet.gridy = 0;
    activation.add(lblSheet, gbc_lblSheet);
   
    this.sheet = new InstantTextField() {
      @Override
      protected void editEvent()
      {
        String text = getText();
        if (!EditCondition.this.condition.sheet.equals(text))
        {
          EditCondition.this.condition.sheet = text;
          EditCondition.this.edit.flagChange();
        }
      };
    };
    GridBagConstraints gbc_sheet = new GridBagConstraints();
    gbc_sheet.fill = GridBagConstraints.HORIZONTAL;
    gbc_sheet.insets = new Insets(0, 0, 5, 0);
    gbc_sheet.gridx = 1;
    gbc_sheet.gridy = 0;
    activation.add(this.sheet, gbc_sheet);
   
    JLabel lblIndex = new JLabel("Index");
    GridBagConstraints gbc_lblIndex = new GridBagConstraints();
    gbc_lblIndex.anchor = GridBagConstraints.EAST;
    gbc_lblIndex.insets = new Insets(0, 0, 5, 5);
    gbc_lblIndex.gridx = 0;
    gbc_lblIndex.gridy = 1;
    activation.add(lblIndex, gbc_lblIndex);
   
    this.index = new InstantTextField() {
      @Override
      protected void editEvent()
      {
        String text = getText();
        if (!EditCondition.this.condition.index.equals(text))
        {
          EditCondition.this.condition.index = text;
          EditCondition.this.edit.flagChange();
        }
      };
    };
    GridBagConstraints gbc_index = new GridBagConstraints();
    gbc_index.fill = GridBagConstraints.HORIZONTAL;
    gbc_index.insets = new Insets(0, 0, 5, 0);
    gbc_index.gridx = 1;
    gbc_index.gridy = 1;
    activation.add(this.index, gbc_index);
   
    this.comboBox = new JComboBox();
    this.comboBox.addActionListener(new ActionListener() {
      @Override
      public void actionPerformed(ActionEvent arg0)
      {
        if (Operator.fromSerializedForm(EditCondition.this.condition.symbol) != EditCondition.this.comboBox
          .getSelectedItem())
        {
          EditCondition.this.condition.symbol =
            ((Operator) EditCondition.this.comboBox.getSelectedItem()).getSerializedForm();
          EditCondition.this.edit.flagChange();
        }
      }
    });
    GridBagConstraints gbc_comboBox = new GridBagConstraints();
    gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
    gbc_comboBox.insets = new Insets(0, 0, 5, 0);
    gbc_comboBox.gridx = 1;
    gbc_comboBox.gridy = 2;
    activation.add(this.comboBox, gbc_comboBox);
    this.comboBox.setModel(new DefaultComboBoxModel(Operator.values()));
   
    JLabel lblValue = new JLabel("Value");
    GridBagConstraints gbc_lblValue = new GridBagConstraints();
    gbc_lblValue.anchor = GridBagConstraints.EAST;
    gbc_lblValue.insets = new Insets(0, 0, 0, 5);
    gbc_lblValue.gridx = 0;
    gbc_lblValue.gridy = 3;
    activation.add(lblValue, gbc_lblValue);
   
    this.value = new InstantTextField() {
      @Override
      protected void editEvent()
      {
        String text = getText();
        if (!EditCondition.this.condition.value.equals(text))
View Full Code Here

    gridBagLayout.rowHeights = new int[] { 23, 0 };
    gridBagLayout.columnWeights = new double[] { 1.0, 0.0, 0.0, Double.MIN_VALUE };
    gridBagLayout.rowWeights = new double[] { 0.0, Double.MIN_VALUE };
    panel.setLayout(gridBagLayout);
   
    this.textField = new InstantTextField() {
      @Override
      protected void editEvent()
      {
        evaluateRename();
      }
View Full Code Here

      return;
   
    if (!forceSelect)
      return;
   
    KnowledgeItemType k = KnowledgeItemType.fromSerialClass(item.getClass());
    if (k == null)
      return;
   
    if (this.itemTree.getSelectionPath().getLastPathComponent() instanceof ItemTreeNode
      && ((ItemTreeNode) this.itemTree.getSelectionPath().getLastPathComponent()).getItemName().equals(name))
View Full Code Here

    this.edit.flagChange();
  }
 
  protected void addSoundDialog()
  {
    OggFileChooser fc = new OggFileChooser(this.edit.getSoundDirectory());
    fc.setMultiSelectionEnabled(true);
    int returnValue = fc.showOpenDialog(this);
    if (returnValue != JFileChooser.APPROVE_OPTION)
      return;
   
    File[] files = fc.getSelectedFiles();
    if (files.length == 0)
      return;
   
    for (File file : files)
    {
View Full Code Here

        if (entry.getValue().sheet.equals(Dynamic.DEDICATED_SHEET))
        {
          indexNotComputed = dynamicSheetHash(indexNotComputed);
        }
       
        this.elements.add(new Condition(
          entry.getKey(), this.providers.getSheetCommander(), new SheetEntry(
            entry.getValue().sheet, indexNotComputed),
          Operator.fromSerializedForm(entry.getValue().symbol), entry.getValue().value));
      }
    }
View Full Code Here

TOP

Related Classes of eu.ha3.matmos.game.data.modules.R__legacy_configvars

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.