dart_minecraft icon indicating copy to clipboard operation
dart_minecraft copied to clipboard

Can't read player.dat file on web

Open Frogperson opened this issue 1 year ago • 0 comments

I'm trying to read a Minecraft playerdata file using Flutter Web, and I'm running into a couple issues:

  1. Apparently the file I was trying to read was compressed as gzip. Digging into the code, I saw this comment: "On JS platforms, this does nothing, as it requires converters from 'dart:io'." Not a huge problem for me though, as I can detect the compression type and just use https://pub.dev/packages/archive which does support web.

  2. After decompressing, I'm getting "Error: Unsupported operation: Int64 accessor not supported by dart2js." which is from this line: https://github.com/spnda/dart_minecraft/blob/main/lib/src/utilities/readers/_byte_reader.dart#L61 I also found this related issue: https://github.com/dart-lang/sdk/issues/10275 Is there anything we can do about this?

Frogperson avatar May 29 '23 22:05 Frogperson