Badel2 / slime_seed_finder

https://badel2.github.io/slime_seed_finder
GNU General Public License v3.0
49 stars 4 forks source link

Running generates "invalid type: integer `0`, expected struct SeedInfo" #4

Closed NaNraptor closed 4 years ago

NaNraptor commented 5 years ago
$ slime_seed_finder.exe -o 1234_and_more.txt -i ./1234.txt

thread 'main' panicked at 'Error reading seed info: Serde(Error("invalid type: integer `0`, expected struct SeedInfo", line: 1, column: 2))', src\libcore\result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

The above error is shown when the program is ran.

Just fyi:

$ cat 1234.txt

0,-97
0,-92
0,-83
0,-80
0,-56
0,-54
0,-41
0,-32
0,-21
0,-19
0,-17
0,-12
0,-11
0,7
0,15
0,25
0,27
0,29
0,36
0,55
0,95
1,-82
1,-81
1,-80
1,-79
1,-76
1,-73
1,-60
1,-58
1,-56
1,-52
1,-51
1,-44
1,-26
1,-25
1,-23
1,-19
1,-14
1,6
1,14

So the input file is consisting only of chunk coords, one per line, comma separated as instructed.

YFshadaow commented 4 years ago

Met the same problem when tring to run the program: C:\Windows\System32\slime_seed_finder>slime_seed_finder -i Mychunks.txt -o output.txt thread 'main' panicked at 'Error reading seed info: Serde(Error("invalid type: integer 1, expected struct SeedInfo", line: 1, column: 2))', src\libcore\result.rs:1084:5 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

Badel2 commented 4 years ago

Sorry, I started a refactor and forgot to update the README...

I have replaced the txt file with a json, which can contain much more data. As an example, here is a list of 30 slime chunks. Can you guess the seed? ;)

{
  "version":"1.14",
  "options":{"notFromJavaNextLong":true},
  "slimeChunks":[[0,-90],[0,-87],[0,-83],[0,-72],[0,-71],[0,-70],[0,-63],[0,-61],[0,-54],[0,-53],[0,-52],[0,-18],[0,-17],[0,-12],[0,-10],[0,-9],[0,2],[0,5],[0,21],[0,26],[0,29],[0,34],[0,35],[0,43],[0,66],[0,76],[0,77],[0,90],[1,-99],[1,-96]]
}
slime_seed_finder find -i seedinfo1.json