Examples of readFromNBT()


Examples of appeng.api.parts.IPart.readFromNBT()

          continue;

        ItemStack current = p == null ? null : p.getItemStack( PartItemStack.World );

        if ( Platform.isSameItemType( iss, current ) )
          p.readFromNBT( extra );
        else
        {
          removePart( side, true );
          side = addPart( iss, side, null );
          if ( side != null )
View Full Code Here

Examples of appeng.api.util.IConfigManager.readFromNBT()

  {
    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

Examples of appeng.parts.CableBusContainer.readFromNBT()

  @Override
  public void rotateLeft(IBuilderContext context)
  {
    CableBusContainer cbc = new CableBusContainer( this );
    cbc.readFromNBT( tileNBT );

    cbc.rotateLeft();

    tileNBT = new NBTTagCompound();
    cbc.writeToNBT( tileNBT );
View Full Code Here

Examples of appeng.tile.inventory.AppEngInternalAEInventory.readFromNBT()

      IInventory inv = ((ISegmentedInventory) this).getInventoryByName( "config" );
      if ( inv != null && inv instanceof AppEngInternalAEInventory )
      {
        AppEngInternalAEInventory target = (AppEngInternalAEInventory) inv;
        AppEngInternalAEInventory tmp = new AppEngInternalAEInventory( null, target.getSizeInventory() );
        tmp.readFromNBT( compound, "config" );
        for (int x = 0; x < tmp.getSizeInventory(); x++)
          target.setInventorySlotContents( x, tmp.getStackInSlot( x ) );
      }
    }
  }
View Full Code Here

Examples of appeng.util.ConfigManager.readFromNBT()

    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

Examples of buildcraft.api.gates.GateExpansionController.readFromNBT()

    // Legacy support
    if (nbt.hasKey("Pulser")) {
      NBTTagCompound pulsarTag = nbt.getCompoundTag("Pulser");
      GateExpansionController pulsarCon = GateExpansionPulsar.INSTANCE.makeController(pipe.container);
      pulsarCon.readFromNBT(pulsarTag);
      gate.expansions.put(GateExpansionPulsar.INSTANCE, pulsarCon);
    }

    NBTTagList exList = nbt.getTagList("expansions", Constants.NBT.TAG_COMPOUND);
    for (int i = 0; i < exList.tagCount(); i++) {
View Full Code Here

Examples of buildcraft.api.statements.IStatementParameter.readFromNBT()

     
      for (int j = 0; j < Gate.MAX_PARAMETERS; ++j) {
        if (gateNBT.hasKey("triggerParameters[" + i + "][" + j + "]")) {
          NBTTagCompound cpt = gateNBT.getCompoundTag("triggerParameters[" + i + "][" + j + "]");
          IStatementParameter parameter = StatementManager.createParameter(cpt.getString("kind"));
          parameter.readFromNBT(cpt);
         
          parameter = parameter.rotateLeft();
         
          parameter.writeToNBT(cpt);
          gateNBT.setTag("triggerParameters[" + i + "][" + j + "]", cpt);
View Full Code Here

Examples of buildcraft.api.transport.IPipePluggable.readFromNBT()

          if (!IPipePluggable.class.isAssignableFrom(pluggableClass)) {
            BCLog.logger.warn("Wrong pluggable class: " + pluggableClass);
            continue;
          }
          IPipePluggable pluggable = (IPipePluggable) pluggableClass.newInstance();
          pluggable.readFromNBT(pluggableData);
          pluggables[i] = pluggable;
        } catch (Exception e) {
          BCLog.logger.warn("Failed to load side state");
          e.printStackTrace();
        }
View Full Code Here

Examples of buildcraft.core.builders.BuildingItem.readFromNBT()

    for (int i = 0; i < buildingList.tagCount(); ++i) {
      BuildingItem item = new BuildingItem();

      try {
        item.readFromNBT(buildingList.getCompoundTagAt(i));
        item.context = getContext();
        builder.getBuilders().add(item);
      } catch (MappingNotFoundException e) {
        BCLog.logger.log(Level.WARN, "can't load building item", e);
      }
View Full Code Here

Examples of buildcraft.transport.Gate.readFromNBT()

    if (nbt.hasKey("direction")) {
      direction = ForgeDirection.getOrientation(nbt.getInteger("direction"));
    }

    Gate gate = makeGate(pipe, material, logic, direction);
    gate.readFromNBT(nbt);

    // Legacy support
    if (nbt.hasKey("Pulser")) {
      NBTTagCompound pulsarTag = nbt.getCompoundTag("Pulser");
      GateExpansionController pulsarCon = GateExpansionPulsar.INSTANCE.makeController(pipe.container);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.