Commit Graph

40 Commits (969f26e4066c230d74e07926aac9d4a1f7b400bd)

Author SHA1 Message Date
Treer 969f26e406 Minetest support - initial commit
Rivers don't match the game, but Amidst can now draw maps made with a different engine than Minecraft
2018-03-10 18:48:03 +11:00
Stefan Dollase bc0404d20f added support up to Minecraft 1.12-pre7 2017-06-02 16:47:09 +02:00
Stefan Dollase 91ec0588ce moved facade classes 2017-06-01 20:56:03 +02:00
Stefan Dollase 4c1a9b1048 introduced facade classes MinecraftInstallation, LauncherProfile and UnresolvedLauncherProfile 2017-06-01 02:34:26 +02:00
Stefan Dollase d7725a8de3 the version .json file is now required ...
... not sure if it was implicitly required before
2017-05-31 19:08:14 +02:00
Stefan Dollase 862af90c21 moved classes 2017-05-28 02:31:13 +02:00
Stefan Dollase 80bbd6cb0d moved directory logic 2017-05-28 01:24:12 +02:00
Stefan Dollase 35b62baf2d added support up to Minecraft 1.12-pre3 2017-05-17 19:38:07 +02:00
Stefan Dollase dc1a6fdfb3 rename refactorings 2016-11-20 23:48:53 +01:00
Stefan Dollase bd0e586886 applied the code clean up tool by Eclipse 2016-11-20 22:54:50 +01:00
Stefan Dollase 1832a7c6b5 formatting
* organized imports
* removed unnecessary @formatter:off comments
* formatted the code using the new code formatter with new preferences
2016-11-20 22:29:01 +01:00
Stefan Dollase a54fb33c9d refactorings 2016-11-20 17:53:53 +01:00
Stefan Dollase f14b99cc65 updated the RecognisedVersion list 2016-11-20 17:31:55 +01:00
moulins 7eec61d3d3 Fix for issue #247
Raised RealClasses.MAXIMUM_CLASS_BYTES to 16kB, because the
ChunkProviderSettings.Factory class was too big.
2016-11-17 16:51:24 -05:00
moulins b69dc77e1d CTBuilder refactoring
Made RealClassDetector a functional interface, removed the
amidst.clazz.real.detector classes, and reworked CTBuilder to directly
accept RealClassDetector lambdas.
2016-11-17 15:09:54 -05:00
Stefan Dollase c772f9a05f initial application of the new code formatter 2016-04-11 14:29:06 +02:00
Stefan Dollase 06f5d2f75c added Minecraft 1.9 version recognition 2016-02-29 20:47:04 +01:00
Stefan Dollase af4e497e72 added new minecraft version 1.9-pre2 2016-02-20 04:45:16 +01:00
Stefan Dollase 7d59fc96f4 adjusted logging of world creation
* turned log level from debug to info
* reformatted log message
2016-02-20 04:33:42 +01:00
Stefan Dollase 825b8ab90e added support for new snapshots
Added mechanism to create complete RecognisedVersion enum entries. This includes:

* all existing enum entries
* adding new entries for new versions with unknown magic string
* updating existing entries for new versions with known magic string

The ordering of the entries is preserved. Also, new entries are added at the top. The UNKOWN entry is omitted.

Further changes include:

* adding support for new versions
* updating the test data, since we still have no new magic string
* the name of RecognisedVersion entries is no longer derived from the enum entries name
* RecognisedVersion entries now know whether they are known or the UNKNOWN entry
* cleaned up and improved the devtool to generate the enum entries as well as its output
* added test to ensure the enum identifier matches the name
2016-02-18 00:05:34 +01:00
Stefan Dollase 049d520569 regenerated test data
The previously generated test data were based on faulty biome data, see issue MC-95612. The newly generated test data are generated from unaffected minecraft versions. Since nearly all structures are generated from the biome data, this leads to a change in a great part of the generated test data.

The test data in 15w51b are generated from the buggy stronghold algorithm. The test data in 16w06a are generated from the fixed stronghold algorithm.
2016-02-14 01:15:02 +01:00
Stefan Dollase 8bc10fd375 temporarily disabled fixed stronghold algorithm
* to not break the currently generated test data
* world entries test is passing
2016-02-13 22:29:19 +01:00
Stefan Dollase d77fa11f3d added a test ...
... to ensure there is only one enum entry per magic string. I also removed already existing collisions. I kept the latest version of the colliding pairs.
2016-02-13 19:03:28 +01:00
Stefan Dollase 0ad0955a0d cleaned up the enum RecognisedVersion
* removed duplicate magic string
* removed earliest version pointer, since it was unused
* moved version description for strongholds to DefaultVersionFeatures
* added additional matching versions to comment (1.7.6, 1.7.7, 1.7.8) these must recently have been added back to the minecraft launcher
2016-02-13 18:07:33 +01:00
Treer b94a3bff95 New stronghold location algorithm
Issue MC-92289 with stronghold positioning was fixed in V16w06a - https://bugs.mojang.com/browse/MC-92289
2016-02-13 19:34:51 +11:00
Treer 3c1f9ae197 More snapshot version recognition 2016-02-13 03:12:16 +11:00
Stefan Dollase 519d5272fd refactored the test code
* improved the code
* switched biome data storage format to protobuf (binary)
* switched back to json (see reasons below)
* switched biome data serialization strategy
* added mechanism to test specific entries for specific worlds
* squashed commits to prevent git from storing the outdated big testdata files forever

And this are the old detailed commit messages:

changed strategy for biome data storage

* it now tracks and stores all biome data requests while the other test data are created
* the same request during the running test will offer the same response as during the test data generation
* this greatly simplifies the code, makes the size of the test data much smaller and the testdata creation and loading much faster

removed the binary test data storage

* switched back to json
* did not serve a significant better result (time and space)
* protobuf documentation discourages the use for large messages
* I want to not use code generation whenever possible because
  * it contains warnings
  * it is differently formatted than the hand written code
  * it makes the build process more complicated

Here are the stats:
                  json        binary    binary packed
test time:       13,193 s     9,838 s      9,333 s
complete:         6,4 mb      6,1 mb       6,1 mb
uncompressed:   260,8 mb    212,5 mb     212,5 mb

complete is the compressed size of all zip files. uncompressed is the uncompressed size of the full-resolution biome data. We see, that the compression removes a big portion of the space advantage that would be served by the binary format. The binary packed format seems to not be any better than the default binary format. Just the few seconds are not really worth the disadvantages listed above.

fixed bugs in test data generation

* test world generation now omits unsupported entries
* creation of an empty coordinates collection throws an exception to prevent the usage of empty testdata

switched BiomeData to binary storage format

rename refactorings and adjustments to the protobuf format

added equalityChecker to TestWorldEntryDeclaration

used the method TestWorldDeclaraion.isSupported() ...

... to allow that only specific features are tested for special test worlds

enhanced readability of test world entry declaration

more refactorings for the testworld code

extracted the class TestWorld from the class TestWorldDirectory

renamed and moved classes

moved write and read methods to entry declaration

added protobuf

* library
* license
* testdata declarations
* generated code from testdata declarations

improved testdata storage

* split up the single zip file into multiple small ones to only change as few data as possible, when they need to be changed
* removed timestamp from zip files to make them reproducible

removed many usages of TestWorldDeclaration by exposing the regocnised version from the world object
2016-01-31 16:41:04 +01:00
Stefan Dollase da26a17f3b added world icon test
To prevent the need to make the minecraft jar file and libraries available on travis ci, this test uses previously generated testdata to ensure that the generated world icons are still the same as when the test data where generated. It is true, that this uses the production code to generate the test data, however, this is not an issue, because the test data are stored and not generated every time the test is executed. All in all, the test checks whether the generated world icons have changed since the test data where generated. It does not ensure, that the world icons are correct (meaning like minecraft generates them).

The test:
* loads the biome data from the test data
* loads the world icons
* creates a fake minecraft interface that provides the stored biome data
* creates a world object using the fake minecraft interface
* generates all world icons using the world object
* compares the generated world icons to the loaded world icons

The test data contains all biome data in the test area as well as all world icons. The test area is 10 fragments in all directions from [0, 0] ([-5120, -5120] to [5120, 5120]). The world icons are generated for the inner 10 - 1 = 9 fragments ([-4608, -4608] to [4608, 4608]). This prevents the world icon producers to request biome data that have not been stored. The test data are stored in a zip-file to prevent them from taking up to much space. One world requires about 6.5 MB (compressed). Thus, we should not add to much test worlds and not change them very often to prevent the repository from getting too big. An alternative would be stored the testdata somewhere else than in the repository. However, they have to be available for travis ci, so this will be the solution for now.

* The End Cities are currently not included.
* The current seed is "amidst-test-seed" using the default world type and minecraft version 1.8.9.
* The test data are generated by running the test in the class DevToolRunner.
2016-01-25 02:05:37 +01:00
Stefan Dollase 0ae1ee638e added recognition for the snapshot 16w02a 2016-01-15 23:03:06 +01:00
Stefan Dollase 0ce3744f0d updated the recognised version list 2016-01-13 05:23:26 +01:00
Stefan Dollase b3411e01c5 moved relevant comments to the top 2016-01-13 04:54:36 +01:00
Stefan Dollase 04ace4023c added a devtool to generate the recognised version list 2016-01-13 04:44:54 +01:00
Stefan Dollase 19d7aae72c updated version features 2016-01-13 01:20:07 +01:00
Stefan Dollase e1f834b47c moved the remaining parts of the version recognition algorithm to the class RecognisedVersion 2016-01-11 16:12:05 +01:00
Stefan Dollase 24d558d8ba refactored code to enable specific features for specific minecraft versions
* added a set of classes, e.g. VersionFeature
* used these classes to declare version specific properties
* replaced code that did the above manually by a query to the version feature
2016-01-09 23:56:05 +01:00
Stefan Dollase 58f2284231 added igloo world icons
* taken from AmidstExporter
2016-01-07 19:19:29 +01:00
Stefan Dollase cca131775b replaced occurrences of "AMIDST" by "Amidst", when used as a title, or "amidst", when used as an identifier 2015-12-30 19:52:04 +01:00
Stefan Dollase ef90841480 removed most of the general catch clauses 2015-12-23 20:16:06 +01:00
Stefan Dollase ef4ae187e9 made the mojang api more robust against exceptions caused by parsing and io exception 2015-12-23 19:50:39 +01:00
Stefan Dollase 91e3365b42 switched to the default maven project layout 2015-12-19 21:42:56 +01:00