コード例 #1
0
ファイル: TileGenericPipe.java プロジェクト: Xfel/BuildCraft
  @Override
  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);

    if (pipe != null) {
      nbttagcompound.setInteger("pipeId", pipe.itemID);
      pipe.writeToNBT(nbttagcompound);
    } else nbttagcompound.setInteger("pipeId", coreState.pipeId);

    for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
      nbttagcompound.setInteger("facadeBlocks[" + i + "]", facadeBlocks[i]);
      nbttagcompound.setInteger("facadeMeta[" + i + "]", facadeMeta[i]);
    }
  }
コード例 #2
0
ファイル: TileGenericPipe.java プロジェクト: voe/BuildCraft
  @Override
  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);

    if (pipe != null) {
      nbttagcompound.setInteger("pipeId", pipe.itemID);
      pipe.writeToNBT(nbttagcompound);
    } else nbttagcompound.setInteger("pipeId", key);

    for (int i = 0; i < Orientations.dirs().length; i++) {
      nbttagcompound.setInteger("facadeBlocks[" + i + "]", facadeBlocks[i]);
      nbttagcompound.setInteger("facadeMeta[" + i + "]", facadeMeta[i]);
    }
  }