add back Optimize collision to not load chunks

This commit is contained in:
Jake Potrebic
2021-11-24 10:46:06 -08:00
parent 04875eb8c5
commit 56eed81a9a
2 changed files with 127 additions and 1 deletions

View File

@@ -6198,7 +6198,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
BlockState getBlockState(BlockPos pos);
+ // Paper start - if loaded util
+ BlockState getTypeIfLoaded(BlockPos blockposition);
+ @Nullable BlockState getTypeIfLoaded(BlockPos blockposition);
+ default Material getMaterialIfLoaded(BlockPos blockposition) {
+ BlockState type = this.getTypeIfLoaded(blockposition);
+ return type == null ? null : type.getMaterial();
@@ -6314,6 +6314,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ @Override
+ @Nullable
+ public final BlockState getTypeIfLoaded(BlockPos blockposition) {
+ // CraftBukkit start - tree generation
+ if (captureTreeGeneration) {