"Downgrade" Vineflower to 1.10.1 release (#10423)

* "Downgrade" Vineflower to 1.10.1 release

The main thing we lose from the 1.11 snapshots is a recent fix for redundant casts.

* Thanks intellij

* a
This commit is contained in:
Jason Penilla
2024-04-16 12:44:59 -07:00
parent 14b0751f02
commit 76be2651ca
25 changed files with 68 additions and 64 deletions

View File

@@ -39,9 +39,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ NoiseCache cache = noiseCache.get().computeIfAbsent(sampler, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation
for (int m = -12; m <= 12; m++) {
for (int n = -12; n <= 12; n++) {
long o = i + m;
long p = j + n;
- if (o * o + p * p > 4096L && sampler.getValue(o, p) < -0.9F) {
long o = (long)(i + m);
long p = (long)(j + n);
- if (o * o + p * p > 4096L && sampler.getValue((double)o, (double)p) < -0.9F) {
- float g = (Mth.abs((float)o) * 3439.0F + Mth.abs((float)p) * 147.0F) % 13.0F + 9.0F;
+ // Paper start - Perf: Optimize end generation by using a noise cache
+ long key = net.minecraft.world.level.ChunkPos.asLong((int) o, (int) p);
@@ -58,6 +58,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ if (g != Float.MIN_VALUE) {
+ // Paper end - Perf: Optimize end generation
float h = k - m * 2;
float q = l - n * 2;
float h = (float)(k - m * 2);
float q = (float)(l - n * 2);
float r = 100.0F - Mth.sqrt(h * h + q * q) * g;