@Override
  public void writeToNBT(NBTTagCompound nbtTags) {
    super.writeToNBT(nbtTags);

    nbtTags.setBoolean("finishedCalc", finishedCalc);

    if (fluidTank.getFluid() != null) {
      nbtTags.setTag("fluidTank", fluidTank.writeToNBT(new NBTTagCompound()));
    }

    NBTTagList activeList = new NBTTagList();

    for (Coord4D wrapper : activeNodes) {
      NBTTagCompound tagCompound = new NBTTagCompound();
      wrapper.write(tagCompound);
      activeList.appendTag(tagCompound);
    }

    if (activeList.tagCount() != 0) {
      nbtTags.setTag("activeNodes", activeList);
    }

    NBTTagList usedList = new NBTTagList();

    for (Coord4D obj : usedNodes) {
      activeList.appendTag(obj.write(new NBTTagCompound()));
    }

    if (activeList.tagCount() != 0) {
      nbtTags.setTag("usedNodes", usedList);
    }
  }