crbednarz / AMIDST

Advanced Minecraft Interface and Data/Structure Tracking
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-tools/1262200-v3-7-amidst-strongholds-village-biome-etc-finder
GNU General Public License v3.0
270 stars 52 forks source link

Refactoring #87

Closed stefandollase closed 8 years ago

stefandollase commented 9 years ago

Hi,

I really like this tool and I was wondering how it works, so I had a look at the source code. Somehow I managed to refactor the code while I tried to understand it (It helped me to understand it :-P). Since it was quite a bit of work I thought I might as well share it with you, so if you are interested in merging it back in just go ahead. I tried not to change any behaviour and it still works for me. If you are interested in merging it back in, I might go ahead and do a few more refactorings in the future.

Regards Stefan

stefandollase commented 9 years ago

I guess, now I understand the code pretty well. I fixed some bugs and hopefully did not introduce too many new ones. Also, I optimized the class loading. I hope, the code is easy to understand for you, so you can work with it in the future.

stefandollase commented 9 years ago

Maybe it is a good idea to post a summary of the changes. I took the classes Minecraft, MinecraftClass, ByteClass, ClassChecker and related classes and converted them to the new packages:

The whole amidst.clazz package has nearly no dependencies to the rest of the project. Also, I heavily used the Builder pattern to clearly separate the process of building from the actual usage. I also tried to use very strict naming convensions, so it is clear to others what a specific name stands for.

stefandollase commented 9 years ago

Thanks to @Treer I was able to upgrade this branch to support all current 1.9 Minecraft snapshots. I also added a simple tool to check which Minecraft versions work with the current class recognition rule set. It checks all versions that are currently available in the Minecraft Launcher. Here is the output for the current rule set:

================ SUCCESSFUL VERSIONS ============
15w45a
15w44b
15w43c
15w42a
15w41b
15w40b
15w39c
15w38b
15w37a
15w36d
15w35e
15w34d
15w33c
15w32c
15w31c
1.8.8
1.8.7
1.8.6
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8

================ FAILED VERSIONS ================
1.7.10
1.7.9
1.7.5
1.7.4
1.7.2
1.6.4
1.6.2
1.6.1
1.5.2
1.5.1
1.4.7
1.4.6
1.4.5
1.4.4
1.4.2
1.3.2
1.3.1
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1
1.1
1.0
b1.8.1
b1.8
b1.7.3
b1.7.2
b1.7
b1.6.6
b1.6.5
b1.6.4
b1.6.3
b1.6.2
b1.6.1
b1.6
b1.5_01
b1.5
b1.4_01
b1.4
b1.3_01
b1.3b
b1.2_02
b1.2_01
b1.2
b1.1_02
b1.1_01
b1.0.2
b1.0_01
b1.0
a1.2.6
a1.2.5
a1.2.4_01
a1.2.3_04
a1.2.3_02
a1.2.3_01
a1.2.3
a1.2.2b
a1.2.2a
a1.2.1_01
a1.2.1
a1.2.0_02
a1.2.0_01
a1.2.0
a1.1.2_01
a1.1.2
a1.1.0
a1.0.17_04
a1.0.17_02
a1.0.16
a1.0.15
a1.0.14
a1.0.11
a1.0.5_01
a1.0.4
inf-20100618
c0.30_01c
c0.0.13a_03
c0.0.13a
c0.0.11a
rd-161348
rd-160052
rd-132328
rd-132211

To run the tool yourself, just set the minecraftVersionsDirectory in amidst.devtools.settings.DevToolsSettings to an empty folder. The tool will download all Minecraft versions to this folder. Afterwards, execute the class amidst.devtools.MinecraftVersionCompatibilityChecker.

Treer commented 9 years ago

Nice job!

Any idea why it breaks on the earlier versions? Was that my loosening of the rules for finding BlockInit in the new snapshots? (I will get these tools installed myself)

stefandollase commented 9 years ago

You are right, the issue was that I missed that BlockInit is an optional class that is not always there. However, this problem is now fixed and thus it works for older versions. Here is the updated list:

================= SUPPORTED VERSIONS =================
15w45a
15w44b
15w43c
15w42a
15w41b
15w40b
15w39c
15w38b
15w37a
15w36d
15w35e
15w34d
15w33c
15w32c
15w31c
1.8.8
1.8.7
1.8.6
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8
1.7.10
1.7.9
1.7.5
1.7.4
1.7.2
1.6.4
1.6.2
1.6.1
1.5.2
1.5.1
1.4.7
1.4.6
1.4.5
1.4.4
1.4.2
1.3.2
1.3.1
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1

================ UNSUPPORTED VERSIONS ================
1.1
1.0
b1.8.1
b1.8
b1.7.3
b1.7.2
b1.7
b1.6.6
b1.6.5
b1.6.4
b1.6.3
b1.6.2
b1.6.1
b1.6
b1.5_01
b1.5
b1.4_01
b1.4
b1.3_01
b1.3b
b1.2_02
b1.2_01
b1.2
b1.1_02
b1.1_01
b1.0.2
b1.0_01
b1.0
a1.2.6
a1.2.5
a1.2.4_01
a1.2.3_04
a1.2.3_02
a1.2.3_01
a1.2.3
a1.2.2b
a1.2.2a
a1.2.1_01
a1.2.1
a1.2.0_02
a1.2.0_01
a1.2.0
a1.1.2_01
a1.1.2
a1.1.0
a1.0.17_04
a1.0.17_02
a1.0.16
a1.0.15
a1.0.14
a1.0.11
a1.0.5_01
a1.0.4
inf-20100618
c0.30_01c
c0.0.13a_03
c0.0.13a
c0.0.11a
rd-161348
rd-160052
rd-132328
rd-132211
Freso commented 9 years ago

I am not @skiphs, but I would personally prefer to have separate "things" be in separate PRs; ie., refactoring is one thing and should be in one PR, updating for 1.9 support is one thing and should be in its own PR. That's just me though, and @skiphs may be fine or even prefer this current approach. Just putting it out there. :)

stefandollase commented 9 years ago

Thanks for your feedback @Freso. In general, we share the opinion that one should have one feature per branch. However, it is not always that easy. In this case, I refactored the code that handles the recognition and usage of the minecraft code. Since the upgrade for the 1.9 support heavily relies on this code, I figured it kind of belongs in here. Also, I did not come up with the recognition rules myself, but @Treer pointed me to his implementation which is based on the old code: https://github.com/Treer/AmidstExporter/commit/b3cbd36ee2a8ad2af9f5024114e86a2e6423faa1. I simply ported his implementation to work with the refactored code.

Also, the devtools I implemented serve as tests to ensure I did not break version compatibility during the refactoring.

VanessaPeacock commented 9 years ago

unsubscribe HOW?  Vanessa Peacock (971)998-6333 From: Stefan Dollase notifications@github.com To: skiphs/AMIDST AMIDST@noreply.github.com Sent: Tuesday, November 10, 2015 6:49 PM Subject: Re: [AMIDST] Refactoring (#87)

Thanks to @Treer I was able to upgrade this branch to support all current 1.9 Minecraft snapshots. I also added a simple tool to check which Minecraft versions work with the current class recognition rule set. It checks all versions that are currently available in the Minecraft Launcher. Here is the output for the current rule set:================ SUCCESSFUL VERSIONS ============ 15w45a 15w44b 15w43c 15w42a 15w41b 15w40b 15w39c 15w38b 15w37a 15w36d 15w35e 15w34d 15w33c 15w32c 15w31c 1.8.8 1.8.7 1.8.6 1.8.5 1.8.4 1.8.3 1.8.2 1.8.1 1.8

================ FAILED VERSIONS ================ 1.7.10 1.7.9 1.7.5 1.7.4 1.7.2 1.6.4 1.6.2 1.6.1 1.5.2 1.5.1 1.4.7 1.4.6 1.4.5 1.4.4 1.4.2 1.3.2 1.3.1 1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.1 1.0 b1.8.1 b1.8 b1.7.3 b1.7.2 b1.7 b1.6.6 b1.6.5 b1.6.4 b1.6.3 b1.6.2 b1.6.1 b1.6 b1.5_01 b1.5 b1.4_01 b1.4 b1.3_01 b1.3b b1.2_02 b1.2_01 b1.2 b1.1_02 b1.1_01 b1.0.2 b1.0_01 b1.0 a1.2.6 a1.2.5 a1.2.4_01 a1.2.3_04 a1.2.3_02 a1.2.3_01 a1.2.3 a1.2.2b a1.2.2a a1.2.1_01 a1.2.1 a1.2.0_02 a1.2.0_01 a1.2.0 a1.1.2_01 a1.1.2 a1.1.0 a1.0.17_04 a1.0.17_02 a1.0.16 a1.0.15 a1.0.14 a1.0.11 a1.0.5_01 a1.0.4 inf-20100618 c0.30_01c c0.0.13a_03 c0.0.13a c0.0.11a rd-161348 rd-160052 rd-132328 rd-132211 To run the tool yourself, just set the minecraftVersionsDirectory in amidst.devtools.settings.DevToolsSettings to an empty folder. The tool will download all Minecraft versions to this folder. Afterwards, execute the class amidst.devtools.MinecraftVersionCompatibilityChecker.— Reply to this email directly or view it on GitHub.

stefandollase commented 9 years ago

@VanessaPeacock

stefandollase commented 8 years ago

I extended the scope of the refactoring to the complete project. Here is the changelog:

Player loading, moving and saving

GUI

Reworked the code that is responsible to display a world

Coding style

Threading

Packages

Project structure

Next steps

empi89 commented 8 years ago

:+1:

VanessaPeacock commented 8 years ago

How do I unsubscribe????

Vanessa Peacock (971)998-6333

On Dec 17, 2015, at 11:33 AM, Peter Hansen notifications@github.com wrote:

— Reply to this email directly or view it on GitHub.

stefandollase commented 8 years ago

Just another little update:

Also, I noticed that java 7 no longer receives updates, so we should probably just use the base64 decoder that comes with java 8 and force the users to update.

stefandollase commented 8 years ago

As announced above, I had a look at the build process and automated it using travis ci. Here is what happened:

JMoVS commented 8 years ago

@stefandollase You haven't heard at all from @skiphs , did you? Otherwise I suggest people to switch to your fork by now if that works...

empi89 commented 8 years ago

:+1: @JMoVS

JMoVS commented 8 years ago

@stefandollase Ok, so I tried compiling your version and pull request from source, but it crashes on startup. Here is the error message:

info] Biome color profile activated.
[info] Beginning latest version list load.
[info] Attempting to download remote version list...
[info] Successfully loaded version list. URL: https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
[info] Scanning for profiles.
[info] Successfully loaded profile list.
[crash] Amidst has encounted an uncaught exception on thread: Thread[AWT-EventQueue-0,6,main]
[crash] java.lang.UnsupportedOperationException: you need to override the method SimpleWorker.onMainFinishedWithException()
    at amidst.threading.SimpleWorker.onMainFinishedWithException(SimpleWorker.java:40)
    at amidst.threading.SimpleWorker$1.onMainFinishedWithException(SimpleWorker.java:25)
    at amidst.threading.Worker$3.run(Worker.java:49)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
    at java.io.File.<init>(File.java:277)
    at amidst.mojangapi.file.json.launcherprofiles.LauncherProfileJson.createValidProfileDirectory(LauncherProfileJson.java:48)
    at amidst.gui.profileselect.LocalProfileComponent.createProfileDirectory(LocalProfileComponent.java:66)
    at amidst.gui.profileselect.LocalProfileComponent.access$100(LocalProfileComponent.java:18)
    at amidst.gui.profileselect.LocalProfileComponent$1.main(LocalProfileComponent.java:50)
    at amidst.gui.profileselect.LocalProfileComponent$1.main(LocalProfileComponent.java:47)
    at amidst.threading.SimpleWorker$1.main(SimpleWorker.java:15)
    at amidst.threading.Worker$1.run(Worker.java:24)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

[crash] Amidst has encounted an uncaught exception on thread: Thread[AWT-EventQueue-0,6,main]
[crash] java.lang.UnsupportedOperationException: you need to override the method SimpleWorker.onMainFinishedWithException()
    at amidst.threading.SimpleWorker.onMainFinishedWithException(SimpleWorker.java:40)
    at amidst.threading.SimpleWorker$1.onMainFinishedWithException(SimpleWorker.java:25)
    at amidst.threading.Worker$3.run(Worker.java:49)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
    at java.io.File.<init>(File.java:277)
    at amidst.mojangapi.file.json.launcherprofiles.LauncherProfileJson.createValidProfileDirectory(LauncherProfileJson.java:48)
    at amidst.gui.profileselect.LocalProfileComponent.createProfileDirectory(LocalProfileComponent.java:66)
    at amidst.gui.profileselect.LocalProfileComponent.access$100(LocalProfileComponent.java:18)
    at amidst.gui.profileselect.LocalProfileComponent$1.main(LocalProfileComponent.java:50)
    at amidst.gui.profileselect.LocalProfileComponent$1.main(LocalProfileComponent.java:47)
    at amidst.threading.SimpleWorker$1.main(SimpleWorker.java:15)
    at amidst.threading.Worker$1.run(Worker.java:24)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
stefandollase commented 8 years ago

@JMoVS Yes, I did not have any contact to @skiphs . I am unsure how to handle this situation. I do not really want to fork the project again. There are already different forks with different functionality, see https://github.com/Treer/AmidstExporter by @Treer . The best thing would be to merge them back together in a common code base. The best solution would be to do this in the well known repository, which is the one by @skiphs . However, there does not seem to be much interest in doing so by @skiphs and the other collaborators. It would be really interesting to hear a statement by @skiphs or the other collaborators about the current state and the planed future of this repository.

The current state of my fork is that it is still in active development. Also, it does not contain many of the new minecraft 1.9 features, which are or will be included in AmidstExporter, e.g. igloo icons and a map of the end island. However, I would like to include these features into this pull request eventually. Of course, I am always happy to get feedback about my changes, so bugs can be fixed before the official release.

Speaking of which, I looked into the bug that was posted above by @JMoVS . It was caused by a minecraft launcher profile that did not contain a separate gameDir (profile directory). That was indeed a use-case that I did not test on my machine, since I did only have profiles with a gameDir. To cut a long story short, it should be fixed by f7f4cd4. I also fixed a few other issues. @JMoVS Can you try again if the error still occurs in the latest version?

flying-sheep commented 8 years ago

i was the guy who nudged @skiphs into releasing on github and did a bit of intitial refactoring work, but not too much.

i’d help, but @skiphs has since revoked my contributor rights to this terminal (completely understandable since i didn’t contribute anything in a log time)

JMoVS commented 8 years ago

What are @Treer's thoughts? Maybe switch to his fork? This project here seems pretty stale so not sure what to do. How does @Treer think about these changes and/or getting to be the main repo?

@stefandollase Also, I found another bug just by loading my world. It didn't crash but I got the crasher window (other bug is fixed ;-) ):

[info] Biome color profile activated.
[info] Beginning latest version list load.
[info] Attempting to download remote version list...
[info] Successfully loaded version list. URL: https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
[info] Scanning for profiles.
[info] Successfully loaded profile list.
[info] Loading libraries.
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/oshi-project/oshi-core/1.1/oshi-core-1.1.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/net/java/dev/jna/platform/3.4.0/platform-3.4.0.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/ibm/icu/icu4j-core-mojang/51.2/icu4j-core-mojang-51.2.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/paulscode/codecjorbis/20101023/codecjorbis-20101023.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/paulscode/codecwav/20101023/codecwav-20101023.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/paulscode/libraryjavasound/20101123/libraryjavasound-20101123.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/paulscode/librarylwjglopenal/20100824/librarylwjglopenal-20100824.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/paulscode/soundsystem/20120107/soundsystem-20120107.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/google/guava/guava/17.0/guava-17.0.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/commons-io/commons-io/2.4/commons-io-2.4.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/net/java/jinput/jinput/2.0.5/jinput-2.0.5.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/mojang/authlib/1.5.21/authlib-1.5.21.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/com/mojang/realms/1.7.48/realms-1.7.48.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/apache/httpcomponents/httpcore/4.3.2/httpcore-4.3.2.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/apache/logging/log4j/log4j-api/2.0-beta9/log4j-api-2.0-beta9.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/apache/logging/log4j/log4j-core/2.0-beta9/log4j-core-2.0-beta9.jar
[warning] Failed attempt to load library at: /Users/justin/Library/Application Support/minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209
[info] Skipping library: org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209
[warning] Failed attempt to load library at: /Users/justin/Library/Application Support/minecraft/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209
[info] Skipping library: org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209
[warning] Failed attempt to load library at: /Users/justin/Library/Application Support/minecraft/libraries/org/lwjgl/lwjgl/lwjgl-platform/2.9.4-nightly-20150209
[info] Skipping library: org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/lwjgl/lwjgl/lwjgl/2.9.2-nightly-20140822/lwjgl-2.9.2-nightly-20140822.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/lwjgl/lwjgl/lwjgl_util/2.9.2-nightly-20140822/lwjgl_util-2.9.2-nightly-20140822.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/org/lwjgl/lwjgl/lwjgl-platform/2.9.2-nightly-20140822/lwjgl-platform-2.9.2-nightly-20140822-natives-osx.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/net/java/jinput/jinput-platform/2.0.5/jinput-platform-2.0.5-natives-osx.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/tv/twitch/twitch/6.5/twitch-6.5.jar
[info] Found library: /Users/justin/Library/Application Support/minecraft/libraries/tv/twitch/twitch-platform/6.5/twitch-platform-6.5-natives-osx.jar
[info] Skipping library: tv.twitch:twitch-external-platform:4.5
[info] Recognised Minecraft Version V1.8.8 with the magic string "orntlljs[Lle;lx[J[[Jlt".
[info] Reading 1.8.9.jar
[info] Jar load complete.
[info] Searching for classes...
[info] Found class BlockInit: kb
[info] Found class WorldType: adr
[info] Found class IntCache: asc
[info] Found class GenLayer: ase
[info] Class search complete.
[info] Loading classes...
[info] unable to find the real class method ase.a(long, @WorldType) -> GenLayer.initializeAllBiomeGenerators2
[info] Classes loaded.
[info] Minecraft load complete.
[debug] Attempting to create world with seed: -1147582804, type: Default, and the following generator options:
[debug] 
[info] loading player locations
[info] using players from the playerdata directory
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] requesting player information for uuid: [Redacted]
[info] increasing fragment cache size from 0 to 1024
[info] fragment cache size increased to 1024
[crash] Amidst has encounted an uncaught exception on thread: Thread[AWT-EventQueue-0,6,main]
[crash] java.lang.UnsupportedOperationException: you need to override the method WorkerWithoutResult.onForkFinishedWithException()
    at amidst.threading.WorkerWithoutResult.onForkFinishedWithException(WorkerWithoutResult.java:88)
    at amidst.threading.WorkerWithoutResult$1.onForkFinishedWithException(WorkerWithoutResult.java:45)
    at amidst.threading.Worker$6.run(Worker.java:86)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
    at amidst.mojangapi.file.json.player.PlayerJson.getSkinUrl(PlayerJson.java:43)
    at amidst.mojangapi.world.player.PlayerInformation.fromUUID(PlayerInformation.java:23)
    at amidst.mojangapi.world.player.PlayerInformationCache.getByUUID(PlayerInformationCache.java:28)
    at amidst.mojangapi.file.nbt.playerfile.PlayerdataPlayerFile.createPlayer(PlayerdataPlayerFile.java:44)
    at amidst.mojangapi.world.player.MovablePlayerList$1.fork(MovablePlayerList.java:74)
    at amidst.mojangapi.world.player.MovablePlayerList$1.fork(MovablePlayerList.java:63)
    at amidst.threading.WorkerWithoutResult$1.fork(WorkerWithoutResult.java:34)
    at amidst.threading.WorkerWithoutResult$1.fork(WorkerWithoutResult.java:15)
    at amidst.threading.Worker$4.run(Worker.java:61)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Treer commented 8 years ago

Regarding my thoughts, I plan to eventually merge the new .jar class recognition code from stefandollase's branch into mine, and I'm trying to keep my changes easy for people to merge into the main repo or into their own branches.

However my own branch has many deviations that may cause merging conflicts, though manual merging of any particular feature should still be straightforward.

I can't spend much time on this for a few weeks, so perhaps when I sit down with it I'll find I've overestimated the differences and could manually "rebase" AmidstExporter off stefandollase's branch, merge in commonly desired features and only differ in exporting features, but that could be a lot of work and right now my goal is to get all the Minecraft 1.9 content available before 1.9 is released.

stefandollase commented 8 years ago

@JMoVS Thanks for reporting another bug. It should be fixed in the latest version. Also, I created a very early and probably unstable alpha release, so if you want to do further testing (which is appreciated) you do not need to build from source by yourself. I noticed that you redacted the player uuids from the posted error message. I do respect that you don't want to publish them. However, I was not able to reconstruct the issue without the specific uuids. So for now, the default player skin will be used for these players. However, if you decide to let me know the uuids, I can try to fix the issue for real.

Regarding the future of amidst, I created the issue #92 so we have a place for the discussion about it.

JMoVS commented 8 years ago

@stefandollase I can have a look at the new ALPHA release the next few days. I tried searching the internet but didn't find a way to contact you (as I'm more comofrtable in giving you the UUID's directly rather than trumpet them out). worked out. ;-)

stefandollase commented 8 years ago

@JMoVS Thanks for sending me the uuids. I investigated the issue and the cause is indeed the backup of the player files in your playerdata directory. These backup files have a name that is an invalid uuid. Thus the mojang server responds with an unexpected answer. The error occured while parsing this answer.

I already fixed the issue by making the mojang api classes much more robust against parsing and IO errors. Now, the backed up playerfiles will be displayed as players with the default skin and the filename as playername.

JMoVS commented 8 years ago

@stefandollase ah ok. I think it’s be wise to just error out or filter out anything that is not hex and/or don’t bother because I manually created them to have a backup of the people’s personal data when we had server problems. So it’s a very personal thing. I think best would be to just filter them out and don’t display them at all and maybe document a way for an exception (eg: name your file _old# (#: a number)) to let it show up in the map and everything else is ignored.

stefandollase commented 8 years ago

@JMoVS Thanks for the feedback. However for now, the current behavior will work fine. It does not crash amidst and it is a good fallback in the case that the minecraft session servers are temporarily unavailable. As you already said, it is not the normal use case to have these backup files. If they exist, the user probably created them by himself, so he can guess what the player-icons stands for. If you really care about it being changed, can you please create an issue for it as soon as the project is in a stable state again?

JMoVS commented 8 years ago

I can but I rpobably won't, as I'd advise against having own backup/old named folders inside a Minecraft world anyhow... So works as expected right now

stefandollase commented 8 years ago

I created the new repository and merge this pull request there. Thus, I will close this pull request. I also copies the descriptions about what changed over to the other pull request.