Examples of writeToNBT()


Examples of appeng.api.networking.crafting.ICraftingLink.writeToNBT()

    {
      ICraftingLink link = getLink( x );
      if ( link != null )
      {
        NBTTagCompound ln = new NBTTagCompound();
        link.writeToNBT( ln );
        extra.setTag( "links-" + x, ln );
      }
    }
  }
View Full Code Here

Examples of appeng.api.parts.IFacadeContainer.writeToNBT()

    data.setInteger( "hasRedstone", hasRedstone.ordinal() );

    IFacadeContainer fc = getFacadeContainer();
    for (ForgeDirection s : ForgeDirection.values())
    {
      fc.writeToNBT( data );

      IPart part = getPart( s );
      if ( part != null )
      {
        NBTTagCompound def = new NBTTagCompound();
View Full Code Here

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

      {
        NBTTagCompound def = new NBTTagCompound();
        part.getItemStack( PartItemStack.World ).writeToNBT( def );

        NBTTagCompound extra = new NBTTagCompound();
        part.writeToNBT( extra );

        data.setTag( "def:" + getSide( part ).ordinal(), def );
        data.setTag( "extra:" + getSide( part ).ordinal(), extra );
      }
    }
View Full Code Here

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

    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

Examples of appeng.parts.CableBusContainer.writeToNBT()

    cbc.readFromNBT( tileNBT );

    cbc.rotateLeft();

    tileNBT = new NBTTagCompound();
    cbc.writeToNBT( tileNBT );
  }

  @Override
  public IFacadeContainer getFacadeContainer()
  {
View Full Code Here

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

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

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

        if (pluggable == null) {
          nbt.removeTag(key);
        } else {
          NBTTagCompound pluggableData = new NBTTagCompound();
          pluggableData.setString("pluggableClass", pluggable.getClass().getName());
          pluggable.writeToNBT(pluggableData);
          nbt.setTag(key, pluggableData);
        }
      }
    }
View Full Code Here

Examples of buildcraft.core.inventory.SimpleInventory.writeToNBT()

      for (int s = 0; s < 9; ++s) {
        newInv.setInventorySlotContents(r.ordinal() * 9 + s, inv.getStackInSlot(dir * 9 + s));
      }
    }

    newInv.writeToNBT(slot.tileNBT);
  }
}
View Full Code Here

Examples of buildcraft.transport.Gate.writeToNBT()

    for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
      final String key = "Gate[" + i + "]";
      Gate gate = gates[i];
      if (gate != null) {
        NBTTagCompound gateNBT = new NBTTagCompound();
        gate.writeToNBT(gateNBT);
        data.setTag(key, gateNBT);
      } else {
        data.removeTag(key);
      }
    }
View Full Code Here

Examples of buildcraft.transport.TileGenericPipe.SideProperties.writeToNBT()

  public void rotateLeft(IBuilderContext context) {
    SideProperties props = new SideProperties ();

    props.readFromNBT(tileNBT);
    props.rotateLeft();
    props.writeToNBT(tileNBT);

    Item pipeItem = Item.getItemById(tileNBT.getInteger("pipeId"));

    if (BptPipeExtension.contains(pipeItem)) {
      BptPipeExtension.get(pipeItem).rotateLeft(this, context);
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.