aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0501-Fix-MC-187716-Use-configured-height.patch
blob: 17c3ae1ba378facaf392ef3a3820b8a323b6b6d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Sat, 15 Aug 2020 08:04:49 -0500
Subject: [PATCH] Fix MC-187716 Use configured height


diff --git a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java
index 5ad6e0ef718a1775a2310925b8273120687230b1..cdfbdb411eacf5f8c6ced2dbc5789e0d49b93e1f 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherCappedSurfaceBuilder.java
@@ -42,7 +42,7 @@ public abstract class NetherCappedSurfaceBuilder extends SurfaceBuilder<SurfaceB
         BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos();
         BlockState blockState3 = chunk.getBlockState(mutableBlockPos.set(k, 128, m));
 
-        for(int p = 127; p >= i; --p) {
+        for(int p = height; p >= i; --p) { // Paper - fix MC-187716 - use configured height
             mutableBlockPos.set(k, p, m);
             BlockState blockState4 = chunk.getBlockState(mutableBlockPos);
             if (blockState3.is(defaultBlock.getBlock()) && (blockState4.isAir() || blockState4 == defaultFluid)) {
diff --git a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherForestSurfaceBuilder.java b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherForestSurfaceBuilder.java
index fbb756504609285d96e01c4079be06561f75331e..aa6be90ac272c7e1186d177768230b7f52371e68 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherForestSurfaceBuilder.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherForestSurfaceBuilder.java
@@ -34,7 +34,7 @@ public class NetherForestSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderBas
         int o = -1;
         BlockState blockState = surfaceBuilderBaseConfiguration.getUnderMaterial();
 
-        for(int p = 127; p >= i; --p) {
+        for(int p = height; p >= i; --p) { // Paper - fix MC-187716 - use configured height
             mutableBlockPos.set(k, p, m);
             BlockState blockState2 = surfaceBuilderBaseConfiguration.getTopMaterial();
             BlockState blockState3 = chunk.getBlockState(mutableBlockPos);
diff --git a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherSurfaceBuilder.java b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherSurfaceBuilder.java
index 0cdb3a1ca76375fc69d1709cdd34d4176a99a617..206f74305a01604892ff98ece0c8344cc5582d14 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherSurfaceBuilder.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/surfacebuilders/NetherSurfaceBuilder.java
@@ -36,7 +36,7 @@ public class NetherSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderBaseConfi
         BlockState blockState = surfaceBuilderBaseConfiguration.getTopMaterial();
         BlockState blockState2 = surfaceBuilderBaseConfiguration.getUnderMaterial();
 
-        for(int p = 127; p >= i; --p) {
+        for(int p = height; p >= i; --p) { // Paper - fix MC-187716 - use configured height
             mutableBlockPos.set(k, p, m);
             BlockState blockState3 = chunk.getBlockState(mutableBlockPos);
             if (blockState3.isAir()) {