@Override
    public void writeToNBT(NBTTagCompound tag) {
      super.writeToNBT(tag);
      color.writeToNBT(tag);
      tag.setInteger("dir", facing.ordinal());

      tag.setBoolean("free", rotateable);

      tag.setString("level", level);
    }
    @Override
    public void readFromNBT(NBTTagCompound tag) {
      super.readFromNBT(tag);
      color = new ColorData(true);
      color.readFromNBT(tag);
      facing = CubeDirections.list[tag.getInteger("dir")];

      rotateable = tag.getBoolean("free");

      level = tag.getString("level");
    }