mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
parent
6910253909
commit
5a125e0fc3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user