Example #1
0
  @Override
  public void readFromNBT(NBTTagCompound nbttagcompound) {
    super.readFromNBT(nbttagcompound);

    coreState.pipeId = nbttagcompound.getInteger("pipeId");
    pipe = BlockGenericPipe.createPipe(coreState.pipeId);

    if (pipe != null) {
      pipe.readFromNBT(nbttagcompound);
    }

    for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) {
      facadeBlocks[i] = nbttagcompound.getInteger("facadeBlocks[" + i + "]");
      facadeMeta[i] = nbttagcompound.getInteger("facadeMeta[" + i + "]");
    }
  }
Example #2
0
  @Override
  public void readFromNBT(NBTTagCompound nbttagcompound) {
    super.readFromNBT(nbttagcompound);

    key = nbttagcompound.getInteger("pipeId");
    pipe = BlockGenericPipe.createPipe(key);

    if (pipe != null) {
      pipe.readFromNBT(nbttagcompound);
    }

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