Skip to content

Commit

Permalink
Fix downloading map.dat
Browse files Browse the repository at this point in the history
  • Loading branch information
rebane2001 committed Dec 29, 2021
1 parent 3e0ec4a commit a81db93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/mapart/greenButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ class GreenButtons extends Component {
console.log(`Created Mapdat by ${(t1 - t0).toString()}ms`);
numberOfSplitsCalculated++;
const { Mapdat_Bytes, whichMap_x, whichMap_y } = e.data.body;
downloadBlobFile(gzip(Mapdat_Bytes), "application/x-minecraft-map", optionValue_mapdatFilenameUseId
const NBT_Array_gzipped = gzip(NBT_Array);
const downloadBlob = new Blob([NBT_Array_gzipped], { type: "application/x-minecraft-level" });
downloadBlobFile(downloadBlob, optionValue_mapdatFilenameUseId
? `map_${(optionValue_mapdatFilenameIdStart + whichMap_y * optionValue_mapSize_x + whichMap_x).toString()}.dat`
: `${uploadedImage_baseFilename}_${whichMap_x.toString()}_${whichMap_y.toString()}.dat`);
break;
Expand Down

0 comments on commit a81db93

Please sign in to comment.