Package appeng.util

Examples of appeng.util.ConfigManager


  protected ContainerMEMonitorable(InventoryPlayer ip, ITerminalHost monitorable, boolean bindInventory) {
    super( ip, monitorable instanceof TileEntity ? (TileEntity) monitorable : null, monitorable instanceof IPart ? (IPart) monitorable : null );

    host = monitorable;
    clientCM = new ConfigManager( this );

    clientCM.registerSetting( Settings.SORT_BY, SortOrder.NAME );
    clientCM.registerSetting( Settings.VIEW_MODE, ViewItems.ALL );
    clientCM.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );
View Full Code Here


  }

  @Override
  public IConfigManager getConfigManager()
  {
    final ConfigManager out = new ConfigManager( new IConfigManagerHost() {

      @Override
      public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
      {
        NBTTagCompound data = Platform.openNbtData( target );
        manager.writeToNBT( data );
      }
    } );

    out.registerSetting( Settings.SORT_BY, SortOrder.NAME );
    out.registerSetting( Settings.VIEW_MODE, ViewItems.ALL );
    out.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );

    out.readFromNBT( (NBTTagCompound) Platform.openNbtData( target ).copy() );
    return out;
  }
View Full Code Here

  }

  @Override
  public IConfigManager getConfigManager(final ItemStack target)
  {
    final ConfigManager out = new ConfigManager( new IConfigManagerHost() {

      @Override
      public void updateSetting(IConfigManager manager, Enum settingName, Enum newValue)
      {
        NBTTagCompound data = Platform.openNbtData( target );
        manager.writeToNBT( data );
      }

    } );

    out.registerSetting( Settings.SORT_BY, SortOrder.NAME );
    out.registerSetting( Settings.VIEW_MODE, ViewItems.ALL );
    out.registerSetting( Settings.SORT_DIRECTION, SortDir.ASCENDING );

    out.readFromNBT( (NBTTagCompound) Platform.openNbtData( target ).copy() );
    return out;
  }
View Full Code Here

TOP

Related Classes of appeng.util.ConfigManager

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.