mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Updated Upstream (Airplane)
Upstream has released updates that appear to apply and compile correctly
Airplane Changes:
5e5ead869e Properly count all liquids
This commit is contained in:
@@ -1949,7 +1949,7 @@ index 7437f01ca8f416e2c9150250e324af4725a4efb6..bdcd0e38a3ba904811112f41d8bfbfc0
|
||||
int LARGE_MAX_STACK_SIZE = 64;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 94857a736d2a16e8ade286c6f2ddf8bd798008eb..29ddf0b12911fb46f260234e704f15f17d80d018 100644
|
||||
index 94857a736d2a16e8ade286c6f2ddf8bd798008eb..598575b540752e050a94ca703a2b135adbb2018c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -338,6 +338,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -2043,7 +2043,7 @@ index 94857a736d2a16e8ade286c6f2ddf8bd798008eb..29ddf0b12911fb46f260234e704f15f1
|
||||
double d1 = 0.0D;
|
||||
boolean flag = this.isPushedByFluid();
|
||||
boolean flag1 = false;
|
||||
@@ -3826,14 +3852,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -3826,14 +3852,62 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
@@ -2091,7 +2091,7 @@ index 94857a736d2a16e8ade286c6f2ddf8bd798008eb..29ddf0b12911fb46f260234e704f15f1
|
||||
+ for (int currY = minYIterate; currY <= maxYIterate; ++currY) {
|
||||
+ net.minecraft.world.level.chunk.LevelChunkSection section = sections[(currY >> 4) - minSection];
|
||||
+
|
||||
+ if (section == null || section.isEmpty() || !section.isRandomlyTickingFluids()) { // if no ticking fluids, nothing in this section
|
||||
+ if (section == null || section.isEmpty() || section.fluidStateCount == 0) { // if no fluids, nothing in this section
|
||||
+ // empty
|
||||
+ // skip to next section
|
||||
+ currY = (currY & ~(15)) + 15; // increment by 15: iterator loop increments by the extra one
|
||||
@@ -2107,11 +2107,12 @@ index 94857a736d2a16e8ade286c6f2ddf8bd798008eb..29ddf0b12911fb46f260234e704f15f1
|
||||
|
||||
if (fluid.is(tag)) {
|
||||
- double d2 = (double) ((float) i2 + fluid.getHeight(this.level, blockposition_mutableblockposition));
|
||||
+ blockposition_mutableblockposition.set((currChunkX << 4) + currX, currY, (currChunkZ << 4) + currZ);
|
||||
+ double d2 = (double) ((float) currY + fluid.getHeight(this.level, blockposition_mutableblockposition));
|
||||
|
||||
if (d2 >= axisalignedbb.minY) {
|
||||
flag1 = true;
|
||||
@@ -3850,9 +3923,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -3850,9 +3924,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3260,6 +3261,44 @@ index 86686c24b0b7de4b4bfadbc77419a8872a8e86ee..e265980f07d95a7912bf8873819033e5
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index 72e3264dc74822f746fb84fec0be400047d2d9f5..831e2dbe530daf63ac9e681a92af2740fa18ac8c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -18,6 +18,9 @@ public class LevelChunkSection {
|
||||
short nonEmptyBlockCount; // Paper - package-private
|
||||
private short tickingBlockCount;
|
||||
private short tickingFluidCount;
|
||||
+ // Airplane start
|
||||
+ public short fluidStateCount;
|
||||
+ // Airplane end
|
||||
public final PalettedContainer<BlockState> states; // Paper - package-private // Paper - public
|
||||
public final com.destroystokyo.paper.util.maplist.IBlockDataList tickingList = new com.destroystokyo.paper.util.maplist.IBlockDataList(); // Paper
|
||||
|
||||
@@ -88,6 +91,7 @@ public class LevelChunkSection {
|
||||
|
||||
if (!fluidState.isEmpty()) {
|
||||
--this.tickingFluidCount;
|
||||
+ --this.fluidStateCount; // Airplane
|
||||
}
|
||||
|
||||
if (!state.isAir()) {
|
||||
@@ -102,6 +106,7 @@ public class LevelChunkSection {
|
||||
|
||||
if (!fluidState2.isEmpty()) {
|
||||
++this.tickingFluidCount;
|
||||
+ ++this.fluidStateCount; // Airplane
|
||||
}
|
||||
|
||||
return blockState;
|
||||
@@ -155,6 +160,7 @@ public class LevelChunkSection {
|
||||
if (fluidState.isRandomlyTicking()) {
|
||||
this.tickingFluidCount = (short)(this.tickingFluidCount + 1); // Paper
|
||||
}
|
||||
+ this.fluidStateCount++; // Airplane
|
||||
}
|
||||
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
index c9e942669458668a184aaec3bc0a5509dd6ab5f0..178e56ffc87ea2beb4d84d1f278f4acf90102379 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||
|
||||
Reference in New Issue
Block a user