fix some compile issues
This commit is contained in:
parent
3c8e176265
commit
e09a44e169
6 changed files with 27 additions and 32 deletions
|
@ -6727,10 +6727,10 @@ index 3aa6636aec62b031e2449db7b1b844d2ee5e9a8d..70e663baefe90c06eca2033f07e7e85c
|
|||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..42e05380a875c52cd6e1cb337958b431a751698b 100644
|
||||
index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..d6d8bbc98fc71997cb52521d59ebb59d727d3c22 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||
@@ -9,10 +9,12 @@ import javax.annotation.Nullable;
|
||||
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -6738,21 +6738,12 @@ index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..42e05380a875c52cd6e1cb337958b431
|
|||
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;
|
||||
@@ -30,6 +32,19 @@ public interface BlockGetter extends LevelHeightAccessor {
|
||||
@@ -30,6 +31,15 @@ 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);
|
||||
|
@ -7063,7 +7054,7 @@ index 532a0cae6db0d830e720a72e9021aa7a8ed0f106..e5e562f75e7d4b6a750f192842940c5e
|
|||
this.levelHeightAccessor = heightLimitView;
|
||||
this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()];
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 36c3a06a94177ec21cfc5c513d16f7168fe2fe2c..5aa89166e854136f366eb36ff02a37ae9ba77ab1 100644
|
||||
index 36c3a06a94177ec21cfc5c513d16f7168fe2fe2c..e4deb276f956c5f292ab8bf7836eeeffd6ed59d5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -114,6 +114,109 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
@ -7071,7 +7062,7 @@ index 36c3a06a94177ec21cfc5c513d16f7168fe2fe2c..5aa89166e854136f366eb36ff02a37ae
|
|||
// 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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue