Commit Graph

34 Commits

Author SHA1 Message Date
Moulins
86ffd6004a Update to Amidst v4.7 2021-06-17 01:23:34 +02:00
dependabot[bot]
f89b9ef429 Bump junit from 4.11 to 4.13.1
Bumps [junit](https://github.com/junit-team/junit4) from 4.11 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.11.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.11...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-12 00:58:46 +01:00
kahomayo
1692199c0e Include ocean generation algorithm
This commit replaces calls to Minecraft's shapeChunk with a custom ocean
generation algorithm. This allows us to remove Byte Buddy as a
dependency and avoid wasteful computations.

The main change consists of adding an `OceanOracle` class which now
handles ocean generation. The relevant algorithms were mostly pretty
straightforward to implement, though the `mergeNoises` function is a bit
complex.

Due to this change, we no longer need to deal with an entire chunk
worth of data; instead we now only allocate one or two layers. The
massive overhead from calling shapeChunk through reflection has also
been eliminated.

I added another config constant, INTERPOLATE_NOISE_VERTICALLY, that
could be disabled for even more performance at the cost of accuracy. I
consider the current performance good enough, so I didn't turn it on by
default.
2021-02-11 22:28:04 +01:00
kahomayo
d25de417f7 Implement oceans in beta terrain
This commit enables displaying oceans in beta versions. I was able to
largely solve the performance issues by implementing a custom noise
generator that only generates at ocean level and by only generating the
most significant octaves.

We are now running part of Minecraft's chunk generation, the
`shapeChunk` method. This uses several PerlinOctaveNoises to determine
for each block in a chunk if it should be air, stone, water, or ice.
As was discovered on the support_early_betas branch, just doing this
would be *very* slow.

This commit employs two major optimizations to get good performance,
both targeting Minecraft's 3D interpolation noise. This noise is
responsible for scrambling the terrain generated by the depth and biome
noises and is vital for accurately showing oceans. The vanilla
implementation is wasteful in two ways: It generates noise for Y values
which are not relevant for determining the blocks at Y=63 and it uses 16
octaves of nosie. My optimized implementation skips irrelevant Y values
and allows us to limit the number of octaves to only the n most
significant ones. This setting is controlled via the OCEAN_PRECISION
constant, I set it to 4 as that provides good accuracy while still being
fast.

This involved implementing my own PerlinNoise and PerlinOctaveNoise
classes. The code is mostly just a straightforward implementation of
Perlin's algorithm while conforming to the interface Minecraft expects.
I actually had to implement a bug, as Minecraft's PerlinNoise
implementation is slightly broken.

This commit adds a new dependency, Byte Buddy, for generating two
classes at runtime:

In order to access an OverworldLevelSource, we need to isntantiate an
OverworldDimension. Until b1.6, OverworldDimension was simply the
non-abstract base of all other dimensions. However, it became abstract
in b1.6 with DimensionOverworld now being an empty class inheriting from
it. I did not know of a way to match this DimensionOverworld, so I am
using Byte Buddy to create a class that inherits from Dimension at
runtime.

Byte Buddy is used to generate a subclass of Minecraft's
PerlinOctaveNoise that delegates to our optimized implementation. These
optimizations are vital to supporting accurate oceans at a reasonable
performance and this was the best way I knew to add them.
2021-02-11 22:28:04 +01:00
Moulins
85c6b1dea4 Bring SeedUtils' JRand in-tree as amidst.util.FastRand 2020-08-30 15:48:20 +02:00
burgerguy
667a795f8e
Optimize structure code, fix some pillager outposts (#884)
* broken still, but whatever

* possibly finish up structures for master merge

* add some null checks

* fix nether fortresses freezing fragment loading

* fix most pillager outposts, fix some other bugs

* fix accidental true instead of false, change some comments

* fix bastions/nether fortresses, finish master merge

* fix all of the compilation errors

* Fix old fortresses and bastions

* improve performance by doing the fragment bounds check before isValidLocation

* add back buggyStructureCoordinateMath to what should have it

* fix tests
2020-08-30 12:55:03 +00:00
Moulins
7803a67d0a Update to Amidst v4.6 2020-08-21 20:19:22 +02:00
Moulins
44f8d7a30e Update to Amidst v4.5 2020-08-19 01:13:33 +02:00
Moulins
aff34b7d4d Update to Amidst v4.5-beta3 2020-07-01 19:51:17 +02:00
Moulins
c5ed40add2 Fix gson library being wrongly minimized in JAR
Fixes #797
2020-07-01 19:51:17 +02:00
Moulins
b8cd65592c Update to Amidst v4.5-beta2 2020-07-01 17:54:31 +02:00
Moulins
f40ff08aae Update Maven plugins; minimize Amidst jar 2020-06-29 15:59:57 +02:00
Moulins
fb5e2882fb Remove jnbt dependency 2020-06-29 15:54:51 +02:00
Moulins
948b64f6b1 Add Querz-NBT dependency 2020-06-29 01:19:02 +02:00
Moulins
64fbad2fef Update to Amidst v4.5-beta1 2020-06-25 21:40:37 +02:00
burgerguy
0ff1bc0703
Version based biomes
* Still working on the biome list, but everything else is there

Also need to reformat biome profiles to use ids

* update some biomes

* possibly finished biome list, changed CursorInformationWidget a bit

* update biome profiles to new format, add new nether biomes to the list, change the color of the nether biome

* update biome profiles to inclue latest biome changes

* wip biome list

* maybe final revision of biome list

* Remove allBiomes() completely in Biome, allow using nulls in DefaultVersionFeatures builder for getting default biome list

* Update CursorInformationWidget.java

* fix bug with getting default profile after building jar

* move some stuff from the b1.7.3 support branch to here

* remove guava, change some stuff to not need guava, add serial ids to 2 exceptions

* Convert old biome profiles to new format automatically

* Update conversion map and serialization of biome profiles

* Add more recognised versions, update biome list, update some colors

* Add serialization test, add create example profile button

* tiny changes with creating example profile

* Set Ctrl+D as the default biome profile shortcut

* display dialog when saving example profile
2020-04-13 16:17:25 +00:00
Moulins
53995579f0 Update to Amidst v4.4 2020-02-06 21:00:01 +01:00
Moulins
03d9e257df Update to Amidst v4.4-beta1 2019-12-12 01:44:50 +01:00
Moulins
32d48911d9 update to Amidst v4.3 2019-07-04 22:23:31 +02:00
CubeTheThird
5fb1c54ab7 Updated POM to include local repo. 2019-06-08 13:42:43 -04:00
Stefan Dollase
73d96e6264 switched from the maven-assembly-plugin to the maven-shade-plugin
* this seems to work better when building fat jar files
* it replaced the default output jar file (without dependencies) by the fat jar file (including all dependencies)
* removed the script that replaced the default jar file by the fat jar file
* enabled the generation of the mac wrapper, since it should work
* the mac wrapper will contain all dependencies twice
2015-12-24 03:18:08 +01:00
Stefan Dollase
9f1c93209e extracted building of windows and mac wrappers to extra pom.xml files
* to prevent issues like the one that was fixed in commit 476f5a
* mac wrapper is still broken and thus disabled
2015-12-24 02:43:32 +01:00
Stefan Dollase
e0609cccdd removed the google tracker 2015-12-23 23:58:10 +01:00
Stefan Dollase
476f5a503d fixed an issue that was introduced in commit #aa7f93
* removed the maven plugin that builds the mac application launcher (configuration was still broken)
* the minecraft code uses google guava
* when executing amidst with eclipse, an exception occured from within the minecraft jar file, while using guava
* the removed maven plugin also uses guava, but another version which seems to be incompatible with the guava version used by the minecraft jar file
* the issue was caused by eclipse adding all maven dependencies to the amidst classpath, which caused the minecraft jar file to use the wrong version of guava ... I guess
* since the maven plugin has a scope of "provided", it is not included in the amidst jar file that is generated by maven
* when executing the generated amidst jar file instead of using eclipse, the issue did not occur ... this supports my guess that eclipse adds all maven dependencies to the amidst classpath
2015-12-22 02:54:39 +01:00
Stefan Dollase
aa7f93ee36 adjusted the build process to generate the windows and mac executables when deployed
* generates windows and mac icon files using imagemagick
* generates the executables using maven plugins launch4j for windows and appbundle for mac
* renames the jar from (removes the -jar-with-dependencies suffix)
* creates a zip file from the mac app directory
2015-12-20 21:12:25 +01:00
Stefan Dollase
d13b08df4f adjusted the pom.xml
* removed timestamp from filename ... it is still in the manifest file
* filename is now read from resource file metadata.properties
2015-12-20 03:45:25 +01:00
Stefan Dollase
8fa387c50f fixed a typo in the pom.xml, so the generated jar file is now actually executable 2015-12-20 01:17:30 +01:00
Stefan Dollase
00eb5f0e6a added junit4 as testing dependency, converted coordinate conversion test to junit test 2015-12-20 00:35:23 +01:00
Stefan Dollase
e0a6576631 removed the last maven warnings
* used maven-install-plugin to install dependencies, that are not available via a public repository, to the local maven repository
2015-12-20 00:24:18 +01:00
Stefan Dollase
7ec22caa32 added source encoding to pom.xml to removed warnings 2015-12-20 00:22:16 +01:00
Stefan Dollase
4eb9add343 adjusted the pom.xml
* added maven-eclipse-plugin to download javadoc and sources for maven dependencies in eclipse
* extracted the jdk version to an extra property
* added the build timestamp to the jar filename and to the manifest file
2015-12-20 00:08:22 +01:00
Stefan Dollase
a2d98955c2 added the configuration for the maven-assembly-plugin to the file pom.xml 2015-12-19 21:50:49 +01:00
Stefan Dollase
91e3365b42 switched to the default maven project layout 2015-12-19 21:42:56 +01:00
Stefan Dollase
c402bc7b4b converted the project to a maven project 2015-12-19 21:21:11 +01:00