fix some compile issues

This commit is contained in:
Jake Potrebic
2023-06-07 14:46:56 -07:00
parent 27f97c0f4e
commit eb4be91142
5 changed files with 13 additions and 18 deletions

View File

@@ -6738,21 +6738,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.material.FluidState;
+import net.minecraft.world.level.material.Material;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.Vec3;
@@ -0,0 +0,0 @@ public interface BlockGetter extends LevelHeightAccessor {
}
BlockState getBlockState(BlockPos pos);
+ // Paper start - if loaded util
+ @Nullable BlockState getBlockStateIfLoaded(BlockPos blockposition);
+ default @Nullable Material getMaterialIfLoaded(BlockPos blockposition) {
+ BlockState type = this.getBlockStateIfLoaded(blockposition);
+ return type == null ? null : type.getMaterial();
+ }
+
+ default @Nullable Block getBlockIfLoaded(BlockPos blockposition) {
+ BlockState type = this.getBlockStateIfLoaded(blockposition);
@@ -7071,7 +7062,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit end
+ // Paper start
+ public @Nullable ChunkHolder playerChunk;
+ public @Nullable net.minecraft.server.level.ChunkHolder playerChunk;
+
+ static final int NEIGHBOUR_CACHE_RADIUS = 3;
+ public static int getNeighbourCacheRadius() {