Package appeng.api.util

Examples of appeng.api.util.IConfigManager


  {
    verifyPermissions( SecurityPermissions.BUILD, false );

    if ( Platform.isServer() )
    {
      IConfigManager cm = this.upgradeable.getConfigManager();
      loadSettingsFromHost( cm );
    }

    checkToolbox();
View Full Code Here


  {
    EntityPlayerMP sender = (EntityPlayerMP) player;
    AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
    if ( baseContainer.getTarget() instanceof IConfigurableObject )
    {
      IConfigManager cm = ((IConfigurableObject) baseContainer.getTarget()).getConfigManager();
      Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() );
      cm.putSetting( option, newState );
    }
  }
View Full Code Here

   */
  public void uploadSettings(SettingsFrom from, NBTTagCompound compound)
  {
    if ( compound != null && this instanceof IConfigurableObject )
    {
      IConfigManager cm = ((IConfigurableObject) this).getConfigManager();
      if ( cm != null )
        cm.readFromNBT( compound );
    }

    if ( this instanceof IPriorityHost )
    {
      IPriorityHost pHost = (IPriorityHost) this;
View Full Code Here

      output.setTag( "display", dsp );
    }

    if ( this instanceof IConfigurableObject )
    {
      IConfigManager cm = ((IConfigurableObject) this).getConfigManager();
      if ( cm != null )
        cm.writeToNBT( output );
    }

    if ( this instanceof IPriorityHost )
    {
      IPriorityHost pHost = (IPriorityHost) this;
View Full Code Here

   */
  public void uploadSettings(SettingsFrom from, NBTTagCompound compound)
  {
    if ( compound != null )
    {
      IConfigManager cm = this.getConfigManager();
      if ( cm != null )
        cm.readFromNBT( compound );
    }

    if ( this instanceof IPriorityHost )
    {
      IPriorityHost pHost = (IPriorityHost) this;
View Full Code Here

   */
  public NBTTagCompound downloadSettings(SettingsFrom from)
  {
    NBTTagCompound output = new NBTTagCompound();

    IConfigManager cm = this.getConfigManager();
    if ( cm != null )
      cm.writeToNBT( output );

    if ( this instanceof IPriorityHost )
    {
      IPriorityHost pHost = (IPriorityHost) this;
      output.setInteger( "priority", pHost.getPriority() );
View Full Code Here

        ((ContainerNetworkTool) c).toggleFacadeMode();
      }
    }
    else if ( c instanceof IConfigurableObject )
    {
      IConfigManager cm = ((IConfigurableObject) c).getConfigManager();

      for (Enum e : cm.getSettings())
      {
        if ( e.name().equals( Name ) )
        {
          Enum def = cm.getSetting( e );

          try
          {
            cm.putSetting( e, Enum.valueOf( def.getClass(), Value ) );
          }
          catch (IllegalArgumentException err)
          {
            // :P
          }
View Full Code Here

      if ( gs instanceof GuiCraftingCPU )
        ((GuiCraftingCPU) gs).clearItems();
    }
    else if ( c instanceof IConfigurableObject )
    {
      IConfigManager cm = ((IConfigurableObject) c).getConfigManager();

      for (Enum e : cm.getSettings())
      {
        if ( e.name().equals( Name ) )
        {
          Enum def = cm.getSetting( e );

          try
          {
            cm.putSetting( e, Enum.valueOf( def.getClass(), Value ) );
          }
          catch (IllegalArgumentException err)
          {
            // :P
          }
View Full Code Here

TOP

Related Classes of appeng.api.util.IConfigManager

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.