forked from PaperMC/Paper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Downgrade" Vineflower to 1.10.1 release (PaperMC#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
- Loading branch information
Showing
30 changed files
with
131 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ Co-authored-by: Dylan Xaldin <[email protected]> | |
Co-authored-by: pop4959 <[email protected]> | ||
|
||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java | ||
index 2cf20ef14ad18346f942395546ad31f2d774f81a..ed8cfa36f41643b191714b2ae6176f58f93bd4b2 100644 | ||
index 92c2df6a6abd9c60e90b0b84ab66987557adb9c8..d5dccab8020e31f818420b8ee59c6d3928f1dfff 100644 | ||
--- a/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java | ||
+++ b/src/main/java/net/minecraft/world/level/levelgen/DensityFunctions.java | ||
@@ -509,6 +509,16 @@ public final class DensityFunctions { | ||
|
@@ -39,9 +39,9 @@ index 2cf20ef14ad18346f942395546ad31f2d774f81a..ed8cfa36f41643b191714b2ae6176f58 | |
+ 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 2cf20ef14ad18346f942395546ad31f2d774f81a..ed8cfa36f41643b191714b2ae6176f58 | |
+ } | ||
+ 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; |
Oops, something went wrong.