mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Update Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly
This commit is contained in:
@@ -125,7 +125,7 @@ index 218f5bafeed8551b55b91c7fccaf6935c8b631ca..f5d01bce4d5547b4aeca96b7962b2090
|
||||
metrics.addCustomChart(new Metrics.DrilldownPie("java_version", () -> {
|
||||
Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 86d73c98ff04384f3d6c9d967ae7ad85c7c29bf1..25f9103041ebc065502bb32066cd8db79518034d 100644
|
||||
index dcae40fde8087ce09ec8b9360f2abc860b88c975..0f0b0bbcc0e47b8fe3e1e5d4a4ef0eed389d020b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -202,16 +202,26 @@ public class PaperConfig {
|
||||
@@ -1660,10 +1660,10 @@ index 505546d32eea4682452dbac02311433157f6a30e..5c7b9ad379f3c272e15648dd16f4df92
|
||||
|
||||
public static <V> CompletableFuture<List<V>> sequenceFailFast(List<? extends CompletableFuture<? extends V>> futures) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index edd2333e0fb24a50bc388249224e9311aa90a10f..61b0e52ec692b8bfc7629ee6e84952a6704362aa 100644
|
||||
index 099db3a627c1d3c08f3b923bb02a1cb8a0a268ab..635ccc60d32333e178b28faae9c26de107b380d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1730,7 +1730,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1721,7 +1721,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
@@ -1672,7 +1672,7 @@ index edd2333e0fb24a50bc388249224e9311aa90a10f..61b0e52ec692b8bfc7629ee6e84952a6
|
||||
}
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
@@ -2306,6 +2306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2297,6 +2297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -1694,10 +1694,10 @@ index 7b6c547e71230fbb3733f99a4597b3f5b51547b8..8242200f073aee40482b190c7c0aafd5
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 24eab3c684bdd0a07008888d84a037b7d2c8bf7d..e395652b99bbee087604f88a23168206ba874e0c 100644
|
||||
index b556c1ef5d9f4667fa755ae843f4f50719c5013c..1312a4d7a6f77d4b9812edd44ed27a6ca7cd7977 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -2454,8 +2454,28 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2403,8 +2403,28 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
return ChunkMap.this.level.getServer().getScaledTrackingDistance(initialDistance);
|
||||
}
|
||||
|
||||
@@ -1726,7 +1726,7 @@ index 24eab3c684bdd0a07008888d84a037b7d2c8bf7d..e395652b99bbee087604f88a23168206
|
||||
Iterator iterator = this.entity.getIndirectPassengers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -2467,6 +2487,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
@@ -2416,6 +2436,9 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially
|
||||
i = j;
|
||||
}
|
||||
}
|
||||
@@ -1737,10 +1737,10 @@ index 24eab3c684bdd0a07008888d84a037b7d2c8bf7d..e395652b99bbee087604f88a23168206
|
||||
return this.scaledRange(i);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 6b5d0d15c8de2c783a49a0369342fe67c1a511fa..c6da3c0dd65671851fdbc0cf7a6e32e92be3b968 100644
|
||||
index 7470f3ba66c2e894b5a5b0ba392ecabf8b04aff9..35f27e9a7c82eaec5b4a1a71696dac8485b2cd6d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -985,6 +985,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -983,6 +983,7 @@ public class ServerChunkCache extends ChunkSource {
|
||||
}
|
||||
// Paper end - optimize isOutisdeRange
|
||||
this.level.getProfiler().push("pollingChunks");
|
||||
@@ -1769,10 +1769,10 @@ index b7c9294fdd3d799d410afba4a1118aa371c98533..c71bc00973899feec0ec5530bf3d2379
|
||||
this.wasOnGround = this.entity.isOnGround();
|
||||
this.teleportDelay = 0;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 33cdd12d15637cf6811dd4a4999baedaf0da7389..74efc7798c781ef3c4e95410a7666bbed838bad1 100644
|
||||
index cebaf0fb8187335ca303621a2cb412bb22584e23..d743d50a9b3ad9502fc11adc6fe43e9a58d7a94b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -775,7 +775,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -772,7 +772,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.push("tick");
|
||||
@@ -1794,7 +1794,7 @@ index 33cdd12d15637cf6811dd4a4999baedaf0da7389..74efc7798c781ef3c4e95410a7666bbe
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
}
|
||||
@@ -835,9 +848,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -830,9 +843,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// Paper start - optimise random block ticking
|
||||
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
||||
@@ -1807,7 +1807,7 @@ index 33cdd12d15637cf6811dd4a4999baedaf0da7389..74efc7798c781ef3c4e95410a7666bbe
|
||||
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||
boolean flag = this.isRaining();
|
||||
@@ -848,7 +863,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -843,7 +858,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
gameprofilerfiller.push("thunder");
|
||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||
|
||||
@@ -1816,7 +1816,7 @@ index 33cdd12d15637cf6811dd4a4999baedaf0da7389..74efc7798c781ef3c4e95410a7666bbe
|
||||
blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
@@ -872,7 +887,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -867,7 +882,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
@@ -1938,7 +1938,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 cfe6921b8da87c5dd09772988fb8e4e0da541cd9..d898b5c55f7659a344259cc0d5bc4abfb837eb15 100644
|
||||
index 94857a736d2a16e8ade286c6f2ddf8bd798008eb..732eb171f6a8fe1b02044a00fcf85217c41116ac 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
|
||||
@@ -1952,7 +1952,7 @@ index cfe6921b8da87c5dd09772988fb8e4e0da541cd9..d898b5c55f7659a344259cc0d5bc4abf
|
||||
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
@@ -357,17 +361,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -362,17 +366,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
||||
}
|
||||
|
||||
@@ -1990,7 +1990,7 @@ index cfe6921b8da87c5dd09772988fb8e4e0da541cd9..d898b5c55f7659a344259cc0d5bc4abf
|
||||
for (Entity passenger : passengers) {
|
||||
org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
|
||||
int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
|
||||
@@ -376,6 +399,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -381,6 +404,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
range = passengerRange;
|
||||
}
|
||||
}
|
||||
@@ -2000,7 +2000,7 @@ index cfe6921b8da87c5dd09772988fb8e4e0da541cd9..d898b5c55f7659a344259cc0d5bc4abf
|
||||
|
||||
return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
|
||||
}
|
||||
@@ -2434,9 +2460,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -2439,9 +2465,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
|
||||
// Paper start
|
||||
return io.papermc.paper.util.CollisionUtil.getCollisionsForBlocksOrWorldBorder(this.level, this, axisalignedbb, null,
|
||||
@@ -2199,7 +2199,7 @@ index 42d466f7f162943886078eba3db18f2dfc2d7bee..32da2d3f87758bee359522769ebbee73
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index faa53d08a12cc7441c670cae6d301de3f498ffe7..b17f401d723b1466a3b7e05da3dfeebd5cf763c7 100644
|
||||
index f779f202985d34cb7e379b0f3d5690dd20f091ba..36b5d504cd864ab30cc239201d6a4a52c9d16b7d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -49,9 +49,12 @@ public class GoalSelector {
|
||||
|
||||
Reference in New Issue
Block a user