-
Notifications
You must be signed in to change notification settings - Fork 240
Refactoring #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring #1
Conversation
…necraft version while not displaying a world
Conflicts: src/amidst/Amidst.java src/amidst/Util.java src/amidst/gui/version/LocalVersionComponent.java src/amidst/gui/version/RemoteVersionComponent.java src/amidst/json/InstallInformation.java src/amidst/json/JarLibrary.java src/amidst/json/JarProfile.java src/amidst/json/JarRule.java src/amidst/json/LauncherProfile.java src/amidst/json/Resolution.java src/amidst/json/RuleOs.java src/amidst/map/ImageLayer.java src/amidst/map/Map.java src/amidst/map/layers/BiomeLayer.java src/amidst/map/layers/OceanMonumentLayer.java src/amidst/map/widget/BiomeWidget.java src/amidst/minecraft/Biome.java src/amidst/minecraft/IMinecraftInterface.java src/amidst/minecraft/LocalMinecraftInterface.java src/amidst/minecraft/Minecraft.java src/amidst/minecraft/RecognisedVersion.java src/amidst/minecraft/remote/RemoteMinecraftInterface.java src/amidst/version/MinecraftProfile.java src/amidst/version/VersionFactory.java
…aftInterfaceBuilder
… SinglePlayerPlayerMover
…moved and the risk that comes with it
…oading them from disk
…rted by biome index
…n and directory suffix
* made sure the resources are closed properly in all cases * used the try-with-resources statement, that was introduced in java 7
…r "amidst", when used as an identifier
I reworked the class recognition: 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. |
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 works 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 (this is not the list from the original post, but the current state):
To run the tool yourself, just set the |
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
|
As announced above, I had a look at the build process and automated it using travis ci. Here is what happened:
|
Most of the other posts in the original pull request are kind of off topic. I will summerize the remaining changes in a new post:
|
Here is a link to the original pull request. However, I will repost information about the changes below.