Skip to content
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

Bedrock pattern fix #8474

Merged
merged 2 commits into from Oct 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions patches/server/0330-Flat-bedrock-generator-settings.patch
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Flat bedrock generator settings
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>

diff --git a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
index 06e1774dfbb667aca69bc30c9675ed472cb5728c..2f9ba60c0196c3722fbf5a44fbbcf22a85d438db 100644
index 06e1774dfbb667aca69bc30c9675ed472cb5728c..1d5bc86516df3781aea894c3afd340421ba51a17 100644
--- a/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
+++ b/src/main/java/net/minecraft/data/worldgen/SurfaceRuleData.java
@@ -53,6 +53,66 @@ public class SurfaceRuleData {
Expand Down Expand Up @@ -62,7 +62,7 @@ index 06e1774dfbb667aca69bc30c9675ed472cb5728c..2f9ba60c0196c3722fbf5a44fbbcf22a
+ return false;
+ } else {
+ double d = net.minecraft.util.Mth.map((double) y, (double) i, (double) j, 1.0D, 0.0D);
+ net.minecraft.util.RandomSource randomSource = positionalRandomFactory.at(this.context.blockX, i, this.context.blockZ);
+ net.minecraft.util.RandomSource randomSource = positionalRandomFactory.at(this.context.blockX, y, this.context.blockZ);
+ return (double) randomSource.nextFloat() < d;
+ }
+ }
Expand Down