diff --git a/patches/server/MC-Utils.patch b/patches/server/MC-Utils.patch index 960ab1be08..49990751b7 100644 --- a/patches/server/MC-Utils.patch +++ b/patches/server/MC-Utils.patch @@ -6863,21 +6863,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + @Nullable -+ public final BlockState getBlockStateIfLoaded(BlockPos blockposition) { ++ public final BlockState getBlockStateIfLoaded(BlockPos pos) { + // CraftBukkit start - tree generation -+ if (captureTreeGeneration) { -+ CraftBlockState previous = capturedBlockStates.get(blockposition); ++ if (this.captureTreeGeneration) { ++ CraftBlockState previous = this.capturedBlockStates.get(pos); + if (previous != null) { + return previous.getHandle(); + } + } + // CraftBukkit end -+ if (!isInWorldBounds(blockposition)) { -+ return Blocks.AIR.defaultBlockState(); -+ } -+ ChunkAccess chunk = this.getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4); ++ if (this.isOutsideBuildHeight(pos)) { ++ return Blocks.VOID_AIR.defaultBlockState(); ++ } else { ++ ChunkAccess chunk = this.getChunkIfLoadedImmediately(pos.getX() >> 4, pos.getZ() >> 4); + -+ return chunk == null ? null : chunk.getBlockState(blockposition); ++ return chunk == null ? null : chunk.getBlockState(pos); ++ } + } + + @Override