Apply some feature patches to files instead
They're small and/or really shouldn't be left unapplied
This commit is contained in:
@@ -39,6 +39,14 @@
|
||||
}
|
||||
|
||||
private static void replaceMissingSections(Registry<Biome> biomeRegistry, LevelChunkSection[] sections) {
|
||||
@@ -123,6 +_,7 @@
|
||||
return GameEventListenerRegistry.NOOP;
|
||||
}
|
||||
|
||||
+ public abstract BlockState getBlockState(final int x, final int y, final int z); // Paper
|
||||
@Nullable
|
||||
public abstract BlockState setBlockState(BlockPos pos, BlockState state, boolean isMoving);
|
||||
|
||||
@@ -273,6 +_,7 @@
|
||||
public boolean tryMarkSaved() {
|
||||
if (this.unsaved) {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
@@ -56,6 +_,12 @@
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.wrapped.getBlockState(pos);
|
||||
}
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public final BlockState getBlockState(final int x, final int y, final int z) {
|
||||
+ return this.wrapped.getBlockStateFinal(x, y, z);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
@Override
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
@@ -85,6 +_,18 @@
|
||||
@@ -85,14 +_,32 @@
|
||||
return new ChunkAccess.PackedTicks(this.blockTicks.pack(gametime), this.fluidTicks.pack(gametime));
|
||||
}
|
||||
|
||||
@@ -18,4 +18,21 @@
|
||||
+
|
||||
@Override
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
int y = pos.getY();
|
||||
- int y = pos.getY();
|
||||
+ // Paper start
|
||||
+ return getBlockState(pos.getX(), pos.getY(), pos.getZ());
|
||||
+ }
|
||||
+ public BlockState getBlockState(final int x, final int y, final int z) {
|
||||
+ // Paper end
|
||||
if (this.isOutsideBuildHeight(y)) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
} else {
|
||||
- LevelChunkSection section = this.getSection(this.getSectionIndex(y));
|
||||
- return section.hasOnlyAir() ? Blocks.AIR.defaultBlockState() : section.getBlockState(pos.getX() & 15, y & 15, pos.getZ() & 15);
|
||||
+ // Paper start
|
||||
+ LevelChunkSection section = this.getSections()[this.getSectionIndex(y)];
|
||||
+ return section.hasOnlyAir() ? Blocks.AIR.defaultBlockState() : section.getBlockState(x & 15, y & 15, z & 15);
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user