PaperMC/patches/server-remapped/Fix-MC-187716-Use-configured-height.patch
MiniDigger | Martin 95d25d98e8 Move patches around
2021-06-11 14:02:28 +02:00

45 lines
3.4 KiB
Diff

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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
@@ -0,0 +0,0 @@ public abstract class NetherCappedSurfaceBuilder extends SurfaceBuilder<SurfaceB
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
BlockState iblockdata4 = chunk.getBlockState(blockposition_mutableblockposition.set(k1, 128, l1));
- for (int k2 = 127; k2 >= 0; --k2) {
+ for (int k2 = height; k2 >= 0; --k2) { // Paper - fix MC-187716 - use configured height
blockposition_mutableblockposition.set(k1, k2, l1);
BlockState iblockdata5 = chunk.getBlockState(blockposition_mutableblockposition);
int l2;
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
@@ -0,0 +0,0 @@ public class NetherForestSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderBas
int j2 = -1;
BlockState iblockdata2 = surfaceBlocks.getUnderMaterial();
- for (int k2 = 127; k2 >= 0; --k2) {
+ for (int k2 = height; k2 >= 0; --k2) { // Paper - fix MC-187716 - use configured height
blockposition_mutableblockposition.set(k1, k2, l1);
BlockState iblockdata3 = surfaceBlocks.getTopMaterial();
BlockState iblockdata4 = chunk.getBlockState(blockposition_mutableblockposition);
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
@@ -0,0 +0,0 @@ public class NetherSurfaceBuilder extends SurfaceBuilder<SurfaceBuilderBaseConfi
BlockState iblockdata2 = surfaceBlocks.getTopMaterial();
BlockState iblockdata3 = surfaceBlocks.getUnderMaterial();
- for (int k2 = 127; k2 >= 0; --k2) {
+ for (int k2 = height; k2 >= 0; --k2) { // Paper - fix MC-187716 - use configured height
blockposition_mutableblockposition.set(k1, k2, l1);
BlockState iblockdata4 = chunk.getBlockState(blockposition_mutableblockposition);