[ci skip] Add more identifying patch comments
This commit is contained in:
@@ -13,8 +13,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
FluidState fluid1 = (FluidState) entry.getValue();
|
||||
BlockPos blockposition1 = pos.relative(enumdirection);
|
||||
- BlockState iblockdata1 = world.getBlockState(blockposition1);
|
||||
+ BlockState iblockdata1 = world.getBlockStateIfLoaded(blockposition1); // Paper
|
||||
+ if (iblockdata1 == null) continue; // Paper
|
||||
+ BlockState iblockdata1 = world.getBlockStateIfLoaded(blockposition1); // Paper - Prevent chunk loading from fluid flowing
|
||||
+ if (iblockdata1 == null) continue; // Paper - Prevent chunk loading from fluid flowing
|
||||
|
||||
if (this.canSpreadTo(world, pos, blockState, enumdirection, blockposition1, iblockdata1, world.getFluidState(blockposition1), fluid1.getType())) {
|
||||
// CraftBukkit start
|
||||
@@ -23,9 +23,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
Direction enumdirection = (Direction) iterator.next();
|
||||
BlockPos blockposition1 = pos.relative(enumdirection);
|
||||
- BlockState iblockdata1 = world.getBlockState(blockposition1);
|
||||
+
|
||||
+ BlockState iblockdata1 = world.getBlockStateIfLoaded(blockposition1); // Paper
|
||||
+ if (iblockdata1 == null) continue; // Paper
|
||||
+ BlockState iblockdata1 = world.getBlockStateIfLoaded(blockposition1); // Paper - Prevent chunk loading from fluid flowing
|
||||
+ if (iblockdata1 == null) continue; // Paper - Prevent chunk loading from fluid flowing
|
||||
FluidState fluid = iblockdata1.getFluidState();
|
||||
|
||||
if (fluid.getType().isSame(this) && this.canPassThroughWall(enumdirection, world, pos, state, blockposition1, iblockdata1)) {
|
||||
@@ -35,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
short short0 = FlowingFluid.getCacheKey(fromPos, blockposition2);
|
||||
- Pair<BlockState, FluidState> pair = (Pair) stateCache.computeIfAbsent(short0, (short1) -> {
|
||||
- BlockState iblockdata1 = world.getBlockState(blockposition2);
|
||||
+ // Paper start - avoid loading chunks
|
||||
+ // Paper start - Prevent chunk loading from fluid flowing
|
||||
+ Pair<BlockState, FluidState> pair = stateCache.get(short0);
|
||||
+ if (pair == null) {
|
||||
+ BlockState iblockdatax = world.getBlockStateIfLoaded(blockposition2);
|
||||
@@ -48,7 +47,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ pair = Pair.of(iblockdatax, iblockdatax.getFluidState());
|
||||
+ stateCache.put(short0, pair);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent chunk loading from fluid flowing
|
||||
BlockState iblockdata1 = (BlockState) pair.getFirst();
|
||||
FluidState fluid = (FluidState) pair.getSecond();
|
||||
|
||||
@@ -61,7 +60,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
-
|
||||
- return Pair.of(iblockdata1, iblockdata1.getFluidState());
|
||||
- });
|
||||
+ // Paper start
|
||||
+ // Paper start - Prevent chunk loading from fluid flowing
|
||||
+ Pair pair = (Pair) short2objectmap.get(short0);
|
||||
+ if (pair == null) {
|
||||
+ BlockState iblockdatax = world.getBlockStateIfLoaded(blockposition1);
|
||||
@@ -70,7 +69,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ pair = Pair.of(iblockdatax, iblockdatax.getFluidState());
|
||||
+ short2objectmap.put(short0, pair);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent chunk loading from fluid flowing
|
||||
BlockState iblockdata1 = (BlockState) pair.getFirst();
|
||||
FluidState fluid = (FluidState) pair.getSecond();
|
||||
FluidState fluid1 = this.getNewLiquid(world, blockposition1, iblockdata1);
|
||||
|
||||
Reference in New Issue
Block a user