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

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


  @Override
  public boolean load(ExpansionIdentity identity, Knowledge knowledge)
  {
    try
    {
      return new JasonExpansions_Engine1Deserializer2000().loadJson(this.jasonString, identity, knowledge);
    }
    catch (Exception e)
    {
      e.printStackTrace();
      return false;
View Full Code Here


      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder documentBuilder = dbf.newDocumentBuilder();
     
      Document document = documentBuilder.parse(identity.getPack().getInputStream(identity.getLocation()));
     
      SerialRoot root = new LegacyXMLExpansions_Engine1().loadXMLtoSerial(document);
      try
      {
        if (!this.jsonOutput.exists())
        {
          this.jsonOutput.createNewFile();
View Full Code Here

    Minecraft.getMinecraft().gameSettings.keyBindings =
      ArrayUtils.addAll(Minecraft.getMinecraft().gameSettings.keyBindings, this.keyBindingMain);
    this.keyBindingMain.setKeyCode(this.mod.getConfig().getInteger("key.code"));
    KeyBinding.resetKeyBindingArrayAndHash();
   
    this.keyManager.addKeyBinding(this.keyBindingMain, new Ha3KeyHolding(this, 7));
   
    this.scroller = new VolumeScroller(this.mod);
  }
View Full Code Here

        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
        }
      });
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          return "Global Volume Control: " + (int) Math.floor(globalVolumeControl.getVolume() * 100) + "%";
        }
      });
      sliderControl.updateDisplayString();
     
      this.buttonList.add(sliderControl);
      id++;
     
    }
   
    List<String> sortedNames = new ArrayList<String>(expansions.keySet());
    Collections.sort(sortedNames);
   
    for (int expansionIndex = this.pageFromZero * this.IDS_PER_PAGE; expansionIndex < this.pageFromZero
      * this.IDS_PER_PAGE + this.IDS_PER_PAGE
      && expansionIndex < sortedNames.size(); expansionIndex++)
    {
      final String uniqueIdentifier = sortedNames.get(expansionIndex);
      final Expansion expansion = expansions.get(uniqueIdentifier);
      this.expansionList.add(expansion);
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT + _MIX, _MIX * (id + 1), _ELEMENT_WIDTH - _MIX * 2, _UNIT, "",
          expansion.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          expansion.setVolumeAndUpdate(value * 2);
          if (value > 0f && !expansion.isActivated())
          {
            expansion.activate();
          }
          slider.updateDisplayString();
        }
       
        @Override
        public void sliderPressed(HGuiSliderControl hGuiSliderControl)
        {
        }
       
        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
          if (MAtGuiMenu.this.isAutopreviewEnabled())
          {
            expansion.playSample();
          }
        }
      });
     
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          String display = expansion.getFriendlyName() + ": ";
          if (expansion.getVolume() == 0f)
View Full Code Here

      @Override
      public void sliderPressed(HGuiSliderControl hGuiSliderControl)
      {
      }
    });
    ambienceVolume.setDisplayStringProvider(new HDisplayStringProvider() {
      @Override
      public String provideDisplayString()
      {
        return "Minecraft base Ambient/Environment volume: "
          + (int) Math.floor(MAtGuiMore.this.mod.getConfig().getFloat("minecraftsound.ambient.volume") * 100)
 
View Full Code Here

    int id = 0;
   
    {
      final VolumeUpdatable globalVolumeControl = this.mod.getGlobalVolumeControl();
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT, _MIX, _ELEMENT_WIDTH, _UNIT, "", globalVolumeControl.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          globalVolumeControl.setVolumeAndUpdate(value * 2);
          slider.updateDisplayString();
          MAtGuiMenu.this.mod.getConfig().setProperty("globalvolume.scale", globalVolumeControl.getVolume());
        }
       
        @Override
        public void sliderPressed(HGuiSliderControl hGuiSliderControl)
        {
        }
       
        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
        }
      });
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          return "Global Volume Control: " + (int) Math.floor(globalVolumeControl.getVolume() * 100) + "%";
        }
      });
      sliderControl.updateDisplayString();
     
      this.buttonList.add(sliderControl);
      id++;
     
    }
   
    List<String> sortedNames = new ArrayList<String>(expansions.keySet());
    Collections.sort(sortedNames);
   
    for (int expansionIndex = this.pageFromZero * this.IDS_PER_PAGE; expansionIndex < this.pageFromZero
      * this.IDS_PER_PAGE + this.IDS_PER_PAGE
      && expansionIndex < sortedNames.size(); expansionIndex++)
    {
      final String uniqueIdentifier = sortedNames.get(expansionIndex);
      final Expansion expansion = expansions.get(uniqueIdentifier);
      this.expansionList.add(expansion);
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT + _MIX, _MIX * (id + 1), _ELEMENT_WIDTH - _MIX * 2, _UNIT, "",
          expansion.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          expansion.setVolumeAndUpdate(value * 2);
          if (value > 0f && !expansion.isActivated())
          {
            expansion.activate();
          }
          slider.updateDisplayString();
        }
       
        @Override
        public void sliderPressed(HGuiSliderControl hGuiSliderControl)
        {
        }
       
        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
          if (MAtGuiMenu.this.isAutopreviewEnabled())
          {
            expansion.playSample();
          }
        }
      });
     
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          String display = expansion.getFriendlyName() + ": ";
          if (expansion.getVolume() == 0f)
          {
            if (expansion.isActivated())
            {
              display = display + "Will be disabled";
            }
            else
            {
              display = display + "Disabled";
            }
          }
          else
          {
            display = display + (int) Math.floor(expansion.getVolume() * 100) + "%";
          }
         
          return ChatColorsSimple.THEN_ITALIC + display;
        }
      });
      sliderControl.updateDisplayString();
     
      this.buttonList.add(sliderControl);
     
      if (!this.mod.isDebugMode())
      {
View Full Code Here

      214, _LEFT + _MIX, _MIX * (3 + 1), _WIDTH - _MIX * 2, _UNIT, "Use custom world height: "
        + this.mod.getConfig().getInteger("world.height")));*/
   
    MAtGuiBiomeSlider biomeSlider =
      new MAtGuiBiomeSlider(this.mod, this.mod.getConfig().getInteger("useroptions.biome.override"));
    HGuiSliderControl biomeControl =
      new HGuiSliderControl(
        214, _LEFT, _MIX * (3 + 1), _WIDTH, _UNIT, "", biomeSlider.calculateSliderLocation(this.mod
          .getConfig().getInteger("useroptions.biome.override")));
   
    biomeControl.setListener(biomeSlider);
    biomeControl.setDisplayStringProvider(biomeSlider);
    biomeControl.updateDisplayString();
    this.buttonList.add(biomeControl);
   
    HGuiSliderControl ambienceVolume =
      new HGuiSliderControl(216, _LEFT, _MIX * (4 + 1), _WIDTH, _UNIT, "", this.mod.getConfig().getFloat(
        "minecraftsound.ambient.volume"));
    ambienceVolume.setListener(new HSliderListener() {
     
      @Override
      public void sliderValueChanged(HGuiSliderControl slider, float value)
      {
        Minecraft.getMinecraft().gameSettings.setSoundLevel(SoundCategory.AMBIENT, value);
        MAtGuiMore.this.mod.getConfig().setProperty("minecraftsound.ambient.volume", value);
        slider.updateDisplayString();
      }
     
      @Override
      public void sliderReleased(HGuiSliderControl hGuiSliderControl)
      {
        MAtGuiMore.this.mod.saveConfig();
        Minecraft.getMinecraft().gameSettings.saveOptions();
      }
     
      @Override
      public void sliderPressed(HGuiSliderControl hGuiSliderControl)
      {
      }
    });
    ambienceVolume.setDisplayStringProvider(new HDisplayStringProvider() {
      @Override
      public String provideDisplayString()
      {
        return "Minecraft base Ambient/Environment volume: "
          + (int) Math.floor(MAtGuiMore.this.mod.getConfig().getFloat("minecraftsound.ambient.volume") * 100)
          + "%";
      }
    });
    ambienceVolume.updateDisplayString();
    this.buttonList.add(ambienceVolume);
   
    this.buttonList.add(new GuiButton(215, _LEFT + _MIX, _MIX * (6 + 1), _WIDTH - _MIX * 2, _UNIT, this.mod
      .getConfig().getInteger("debug.mode") == 1
      ? ChatColorsSimple.COLOR_GOLD + "Dev/Editor mode: ON" : "Dev/Editor mode: OFF"));
View Full Code Here

      final VolumeUpdatable globalVolumeControl = this.mod.getGlobalVolumeControl();
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT, _MIX, _ELEMENT_WIDTH, _UNIT, "", globalVolumeControl.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          globalVolumeControl.setVolumeAndUpdate(value * 2);
          slider.updateDisplayString();
          MAtGuiMenu.this.mod.getConfig().setProperty("globalvolume.scale", globalVolumeControl.getVolume());
        }
       
        @Override
        public void sliderPressed(HGuiSliderControl hGuiSliderControl)
        {
        }
       
        @Override
        public void sliderReleased(HGuiSliderControl hGuiSliderControl)
        {
        }
      });
      sliderControl.setDisplayStringProvider(new HDisplayStringProvider() {
        @Override
        public String provideDisplayString()
        {
          return "Global Volume Control: " + (int) Math.floor(globalVolumeControl.getVolume() * 100) + "%";
        }
      });
      sliderControl.updateDisplayString();
     
      this.buttonList.add(sliderControl);
      id++;
     
    }
   
    List<String> sortedNames = new ArrayList<String>(expansions.keySet());
    Collections.sort(sortedNames);
   
    for (int expansionIndex = this.pageFromZero * this.IDS_PER_PAGE; expansionIndex < this.pageFromZero
      * this.IDS_PER_PAGE + this.IDS_PER_PAGE
      && expansionIndex < sortedNames.size(); expansionIndex++)
    {
      final String uniqueIdentifier = sortedNames.get(expansionIndex);
      final Expansion expansion = expansions.get(uniqueIdentifier);
      this.expansionList.add(expansion);
     
      HGuiSliderControl sliderControl =
        new HGuiSliderControl(
          id, _LEFT + _MIX, _MIX * (id + 1), _ELEMENT_WIDTH - _MIX * 2, _UNIT, "",
          expansion.getVolume() * 0.5f);
      sliderControl.setListener(new HSliderListener() {
        @Override
        public void sliderValueChanged(HGuiSliderControl slider, float value)
        {
          expansion.setVolumeAndUpdate(value * 2);
          if (value > 0f && !expansion.isActivated())
View Full Code Here

    this.buttonList.add(biomeControl);
   
    HGuiSliderControl ambienceVolume =
      new HGuiSliderControl(216, _LEFT, _MIX * (4 + 1), _WIDTH, _UNIT, "", this.mod.getConfig().getFloat(
        "minecraftsound.ambient.volume"));
    ambienceVolume.setListener(new HSliderListener() {
     
      @Override
      public void sliderValueChanged(HGuiSliderControl slider, float value)
      {
        Minecraft.getMinecraft().gameSettings.setSoundLevel(SoundCategory.AMBIENT, value);
View Full Code Here

    this.mod = mod;
   
    this.defaultsConfig = new File(mod.util().getModsFolder(), "matmos/dataconfigvars_defaults.cfg");
    this.userConfig = new File(mod.util().getModsFolder(), "matmos/dataconfigvars.cfg");
   
    this.config = new ConfigProperty();
    this.config.setSource(this.defaultsConfig.getAbsolutePath());
    this.config.load();
   
    this.config.setSource(this.userConfig.getAbsolutePath());
    if (!this.userConfig.exists())
View Full Code Here

TOP

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

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.