示例#1
0
  @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
  @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]);
    }
  }