mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7f7d05a [ci skip] Remove IRC link from the README (#10194) PaperMC/Paper@ed130f1 [ci skip] clarify javadocs for Block#getDrops (#10153) PaperMC/Paper@4643b0d Shulker duplicate event (#10135) PaperMC/Paper@b333831 Make spawn egg colours visible (#10158) PaperMC/Paper@0cc3a7e Disable memory reserve allocating (#10180) PaperMC/Paper@3841722 Properly check if a loot table exists (#10190) PaperMC/Paper@b3c8108 [ci skip] Fix incorrect documentation for BlockDropItemEvent (#10175) Pufferfish Changes: pufferfish-gg/Pufferfish@3fc02bb Updated Upstream (Paper) pufferfish-gg/Pufferfish@f5fa99a Oops
This commit is contained in:
@@ -2,7 +2,7 @@ group = org.purpurmc.purpur
|
||||
version = 1.20.4-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion = 1.20.4
|
||||
paperCommit = 1ed50dade82437bf45fe74833d7e6ac2961842a2
|
||||
paperCommit = b3c81089ae26cc3ad2e7388c7b64457f3f83c98a
|
||||
|
||||
org.gradle.caching = true
|
||||
org.gradle.parallel = true
|
||||
|
||||
@@ -625,7 +625,7 @@ index 0000000000000000000000000000000000000000..020368da69b9a492155f6de6297f7473
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ad368b58005b6b0453b709c2ef0ea23bca53d34a
|
||||
index 0000000000000000000000000000000000000000..f6a3364175476c57a7763a087ff55e1689474800
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -0,0 +1,301 @@
|
||||
@@ -921,13 +921,13 @@ index 0000000000000000000000000000000000000000..ad368b58005b6b0453b709c2ef0ea23b
|
||||
+ "the ender dragon whenever a player places an end crystal.");
|
||||
+ }
|
||||
+
|
||||
+ public static boolean disableMethodProfiler;
|
||||
+ public static boolean disableMethodProfiler;
|
||||
+ public static boolean disableOutOfOrderChat;
|
||||
+ private static void miscSettings() {
|
||||
+ private static void miscSettings() {
|
||||
+ disableMethodProfiler = getBoolean("misc.disable-method-profiler", true);
|
||||
+ disableOutOfOrderChat = getBoolean("misc.disable-out-of-order-chat", false);
|
||||
+ setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
+ }
|
||||
+ setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishLogger.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishLogger.java
|
||||
@@ -1497,19 +1497,18 @@ index ba12919c3f9aec34a9e64993b143ae92be5eb172..9efeab9078e2d08903e482718b840797
|
||||
} else {
|
||||
this.lastTimeStamp = body.timeStamp();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 90ae7e8c81f6a9ede8aeaeec3bf784023522cefc..f1944d77aa1d5901c563108099a196ec1e598128 100644
|
||||
index 90ae7e8c81f6a9ede8aeaeec3bf784023522cefc..1dc91ef47d336abe06be1cfd90e8164605e5f37e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -313,6 +313,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
|
||||
|
||||
+ public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
|
||||
+
|
||||
|
||||
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference();
|
||||
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
|
||||
@@ -1219,6 +1221,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1219,6 +1220,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.popPush("nextTickWait");
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
@@ -1522,16 +1521,16 @@ index 90ae7e8c81f6a9ede8aeaeec3bf784023522cefc..f1944d77aa1d5901c563108099a196ec
|
||||
this.waitUntilNextTick();
|
||||
if (flag) {
|
||||
this.tickRateManager.endTickWork();
|
||||
@@ -1855,7 +1863,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1855,7 +1862,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
- return "Paper"; // Paper
|
||||
+ return "Pufferfish"; // Pufferfish - Pufferfish > // Paper
|
||||
+ return "Pufferfish"; // Pufferfish > // Paper
|
||||
}
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
@@ -2442,6 +2450,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2442,6 +2449,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -1613,7 +1612,7 @@ index 5a7278b093e37b95fb005ad5cc3cac90ac36f8fb..28d05b46952397bb664a1c8dae71816c
|
||||
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 366c0c9b45a819f7f94ebe3e49b8ab7f9edf9ce7..097f6eb96c2df203565a0c50aba6221e67a7e026 100644
|
||||
index 366c0c9b45a819f7f94ebe3e49b8ab7f9edf9ce7..1cf8c819c0d7776c3b33d6594ca81abe3c2a719d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -77,6 +77,9 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -1919,7 +1918,7 @@ index d6cbe98e67fdbf8db46338a88ab1356dd63b50a3..20dd3a63b2f955b05a75eb240e33ae4c
|
||||
int LARGE_MAX_STACK_SIZE = 64;
|
||||
int DEFAULT_DISTANCE_LIMIT = 8;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..00b26925b9e0ef7290f904273da875603b6ce11b 100644
|
||||
index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..1d9331fe9ce7308eda2e7da2ae726810d455f090 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -308,7 +308,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1931,20 +1930,17 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..00b26925b9e0ef7290f904273da87560
|
||||
private ChunkPos chunkPosition;
|
||||
private Vec3 deltaMovement;
|
||||
private float yRot;
|
||||
@@ -501,6 +501,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this));
|
||||
}
|
||||
// Paper end - optimise entity tracking
|
||||
+ // Pufferfish start
|
||||
+ public boolean activatedPriorityReset = false; // DAB
|
||||
+ public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // golf score
|
||||
+ public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // used where needed
|
||||
+ // Pufferfish end
|
||||
+
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@@ -807,6 +813,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -423,6 +423,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
private UUID originWorld;
|
||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||
public boolean fixedPose = false; // Paper - Expand Pose API
|
||||
+ public boolean activatedPriorityReset = false; // Pufferfish - DAB
|
||||
+ public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // Pufferfish - DAB (golf score)
|
||||
+ public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // Pufferfish - reduce entity allocations
|
||||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -807,6 +810,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@@ -1957,7 +1953,7 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..00b26925b9e0ef7290f904273da87560
|
||||
this.baseTick();
|
||||
}
|
||||
|
||||
@@ -4402,16 +4414,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4402,16 +4411,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||
@@ -1983,7 +1979,7 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..00b26925b9e0ef7290f904273da87560
|
||||
double d1 = 0.0D;
|
||||
boolean flag = this.isPushedByFluid();
|
||||
boolean flag1 = false;
|
||||
@@ -4419,14 +4433,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4419,14 +4430,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
int k1 = 0;
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||
|
||||
@@ -2051,7 +2047,7 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..00b26925b9e0ef7290f904273da87560
|
||||
|
||||
if (d2 >= axisalignedbb.minY) {
|
||||
flag1 = true;
|
||||
@@ -4448,9 +4509,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4448,9 +4506,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -2262,7 +2258,7 @@ index 07519c817cc6de04a98198c43a0c2b02ba3141eb..ee66be6e5aa45ec8448b6d30785a6e71
|
||||
this.blockPos = mutableBlockPos;
|
||||
this.mob.movingTarget = mutableBlockPos == BlockPos.ZERO ? null : mutableBlockPos.immutable(); // Paper
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
index c8a80c1b2fedff22e8a877d466062375ffb2f0d7..3c4f4af85a3f2d4f9f52827164e63727b916c33a 100644
|
||||
index c8a80c1b2fedff22e8a877d466062375ffb2f0d7..931cbbe41905d7ed3fd46c53d3ddd06a6b9a7c8a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/targeting/TargetingConditions.java
|
||||
@@ -75,9 +75,18 @@ public class TargetingConditions {
|
||||
@@ -2281,7 +2277,7 @@ index c8a80c1b2fedff22e8a877d466062375ffb2f0d7..3c4f4af85a3f2d4f9f52827164e63727
|
||||
+ }
|
||||
+
|
||||
+ double d = this.testInvisible ? targetEntity.getVisibilityPercent(baseEntity) : 1.0D;
|
||||
+ double e = Math.max((followRangeRaw) * d, 2.0D); // Paper
|
||||
+ double e = Math.max((followRangeRaw) * d, 2.0D); // Paper - Fix MC-145656
|
||||
+ // Pufferfish end
|
||||
if (f > e * e) {
|
||||
return false;
|
||||
@@ -2701,19 +2697,19 @@ index 27b0a79f7a7c47047216aae42944bac2a2151181..a097cfc528f709c80575f35483b68783
|
||||
autorecipestackmanager.initialize(this); // Paper - better exact choice recipes
|
||||
int i = 0;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c84adb9f9bb1d6a81d4007b1ab292b133fc34cfb 100644
|
||||
index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c10efc14ca83f07b27a2f12776ab2fd2a953c5a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -212,6 +212,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -211,6 +211,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end - Use getChunkIfLoadedImmediately
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
+ protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter
|
||||
+
|
||||
+ protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter
|
||||
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||
@@ -1313,13 +1315,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1313,14 +1315,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||
@@ -2725,10 +2721,12 @@ index 8f437225d2a4e08ca47873cd42277d9f0f9f5529..c84adb9f9bb1d6a81d4007b1ab292b13
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
getCraftServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
|
||||
- entity.discard();
|
||||
- // Paper end - Prevent block entity and entity crashes
|
||||
+ entity.discard(); // Pufferfish - diff on change ServerLevel.tick
|
||||
// Paper end - Prevent block entity and entity crashes
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
// Paper start - Option to prevent armor stands from doing entity lookups
|
||||
@@ -1793,6 +1795,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
@@ -3273,7 +3271,7 @@ index ebe65474a4a05ff1637d7f37ebcfe690af59def5..42142c512b12e5b269c19f1e821c50e7
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b83c2f1e0ea117eecda94cb51b0ea5bba4d7ab5e..325a097426bcc5e7024ee9559b14c337e35339e3 100644
|
||||
index 34cd96dba5f11e64d7c90f4246b513b0ea943aa6..8344f9f693879639c484edf575c7df14df616776 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -3310,7 +3308,7 @@ index 96d772eb02f79f8c478f5e6f065e387aa7665b18..c5ce412f321b8b4f31cc042893659e21
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 4e1390b9244aeb745ffd3fd1257bc74248722515..e04d721765648a2b5f5bf1f2053e344bfb92f0f4 100644
|
||||
index ca5312febcdd467889ad725c0263367bc5fe69f6..91992a5e329ea335d9e60543f9636cb5c3620a0e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -482,7 +482,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@@ -162,7 +162,7 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..3cb56595822799926a8141e60a42f5d1
|
||||
.completer(new ConsoleCommandCompleter(this.server))
|
||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
|
||||
index e047dee632022abfe05865d1e71838be8d5d053a..888e31a0454888c36cb27602a28619f1f6dbf2c0 100644
|
||||
index 99c5038672b09d0874125e3df280174c1e8151e6..f91ea723a1c85f6cf8c4f6dd7f182b948c2f2e81 100644
|
||||
--- a/src/main/java/net/minecraft/CrashReport.java
|
||||
+++ b/src/main/java/net/minecraft/CrashReport.java
|
||||
@@ -125,6 +125,10 @@ public class CrashReport {
|
||||
@@ -177,10 +177,10 @@ index e047dee632022abfe05865d1e71838be8d5d053a..888e31a0454888c36cb27602a28619f1
|
||||
stringbuilder.append(CrashReport.getErrorComment());
|
||||
stringbuilder.append("\n\n");
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f1944d77aa1d5901c563108099a196ec1e598128..31e640a78dc332a1645865d6619541c550d974f3 100644
|
||||
index 1dc91ef47d336abe06be1cfd90e8164605e5f37e..efebfd62ec415ca47cb116ab66a24478489fe080 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -954,7 +954,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -953,7 +953,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isSameThread()) {
|
||||
@@ -189,17 +189,17 @@ index f1944d77aa1d5901c563108099a196ec1e598128..31e640a78dc332a1645865d6619541c5
|
||||
while (this.getRunningThread().isAlive()) {
|
||||
this.getRunningThread().stop();
|
||||
try {
|
||||
@@ -1863,7 +1863,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1862,7 +1862,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
- return "Pufferfish"; // Pufferfish - Pufferfish > // Paper
|
||||
+ return "Purpur"; // Purpur - Purpur > // Pufferfish - Pufferfish > // Paper
|
||||
- return "Pufferfish"; // Pufferfish > // Paper
|
||||
+ return "Purpur"; // Purpur - Purpur > // Pufferfish > // Paper
|
||||
}
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 325a097426bcc5e7024ee9559b14c337e35339e3..14332ca567a9cc6e781ed60b0cd068b084c16ef0 100644
|
||||
index 8344f9f693879639c484edf575c7df14df616776..09f976c3a98327d95515fce5f7881b826baa11a6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -265,7 +265,7 @@ index e85b9bb3f9c225d289a4959921970b9963881199..c1e2d3a75b9d4710ab6d8b5c62af4bc1
|
||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index e04d721765648a2b5f5bf1f2053e344bfb92f0f4..fda1016052dfbedcc5486d716fa2fb13d14af2df 100644
|
||||
index 91992a5e329ea335d9e60543f9636cb5c3620a0e..dd9ae7cc51386550ec2c30698b55babd87615a9b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -482,7 +482,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@@ -18,7 +18,7 @@ index f253b340d75302fda8e59a2ad113f652c2417869..0c92d10f334f82d196e065c0811d0c1f
|
||||
+ jvmArgs("-DPaper.isRunDev=true")
|
||||
}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index ad368b58005b6b0453b709c2ef0ea23bca53d34a..2dac1ec1daf4084f33ead33d5128d2955da23ee2 100644
|
||||
index f6a3364175476c57a7763a087ff55e1689474800..5e01bfdad663656168604fc878a993dd910bf45b 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -232,7 +232,7 @@ public class PufferfishConfig {
|
||||
@@ -53,14 +53,16 @@ index dbe612427b894df9da1335b94163ba9b89b090c0..0982d44b9dd30c13d9d879095cc9a839
|
||||
|
||||
private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Pufferfish
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 763fe7d1e8334441a5db2285bd4424d165e1c945..b923bdd07d81e09d69f1cbd6f6389ab34e9c427d 100644
|
||||
index c10efc14ca83f07b27a2f12776ab2fd2a953c5a1..a0ef35bee70e6888879a8ede64c4cabad2be85ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -212,7 +212,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -211,8 +211,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end - Use getChunkIfLoadedImmediately
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
-
|
||||
- protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter
|
||||
+
|
||||
+ //protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI
|
||||
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor
|
||||
|
||||
@@ -92,7 +92,7 @@ index c5f92c80d7ca1e1c7f5b9304a5a1173ebfd9c269..1fbfe61b3d7fc372f044d2e9f3500d66
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // Paper - init PaperBrigadierProvider
|
||||
gg.pufferfish.pufferfish.PufferfishConfig.load(); // Pufferfish
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index b923bdd07d81e09d69f1cbd6f6389ab34e9c427d..5b4a47e3078a8bf0533228af14c1a1031ec3ae69 100644
|
||||
index a0ef35bee70e6888879a8ede64c4cabad2be85ae..9a8c80c256020cdbcd307e7032df4b47852e9f50 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -178,6 +178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -112,7 +112,7 @@ index b923bdd07d81e09d69f1cbd6f6389ab34e9c427d..5b4a47e3078a8bf0533228af14c1a103
|
||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b8e578330ad7953f013767c7ff040fee468ce5a5..f4452341be3572129dc8c59bb511ef199ff31938 100644
|
||||
index 09f976c3a98327d95515fce5f7881b826baa11a6..2f0b2807b35c4d3a172e85fb8b60ef8b764ca48e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1037,6 +1037,7 @@ public final class CraftServer implements Server {
|
||||
@@ -139,7 +139,7 @@ index b8e578330ad7953f013767c7ff040fee468ce5a5..f4452341be3572129dc8c59bb511ef19
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -3003,6 +3006,18 @@ public final class CraftServer implements Server {
|
||||
@@ -3001,6 +3004,18 @@ public final class CraftServer implements Server {
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ index fc6903b20a6e084729306fc960a6fc80e094f76c..dad8d358e60902eb186cbc5686219f66
|
||||
return this.type().msgId();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 00b26925b9e0ef7290f904273da875603b6ce11b..b8236e91b4bf204e728cba13c95292329f0058e9 100644
|
||||
index 1d9331fe9ce7308eda2e7da2ae726810d455f090..2323f36e011b375204fc792a7091c85c801344d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4136,6 +4136,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4133,6 +4133,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return SlotAccess.NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ index e17fa30966dea2836fb791becd032fc7d5cc2611..dd06323731533fb9b1b25a56844a4e39
|
||||
super(x, y, z);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 31e640a78dc332a1645865d6619541c550d974f3..e6e25ab0f2ec3fa0cfca945c578dfb170de3dc8a 100644
|
||||
index efebfd62ec415ca47cb116ab66a24478489fe080..bebb1f089783ee84faad3ed3b08c40b9fd2518c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1703,6 +1703,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1702,6 +1702,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
|
||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
|
||||
@@ -79,7 +79,7 @@ index dbcf025c07abafee639d8b94bf963962b5e85478..d9ebf31a51e25706b3964ffe1aa2834b
|
||||
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
|
||||
entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it.
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b8236e91b4bf204e728cba13c95292329f0058e9..fcc95eaaa8f9160f8a3c2391f6d23c27266c3771 100644
|
||||
index 2323f36e011b375204fc792a7091c85c801344d0..48521627d1ba4003727c04f337e96e3a61f6b0c8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -378,7 +378,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -91,7 +91,7 @@ index b8236e91b4bf204e728cba13c95292329f0058e9..fcc95eaaa8f9160f8a3c2391f6d23c27
|
||||
private float eyeHeight;
|
||||
public boolean isInPowderSnow;
|
||||
public boolean wasInPowderSnow;
|
||||
@@ -3010,6 +3010,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3007,6 +3007,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.passengers = ImmutableList.copyOf(list);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ index b8236e91b4bf204e728cba13c95292329f0058e9..fcc95eaaa8f9160f8a3c2391f6d23c27
|
||||
this.gameEvent(GameEvent.ENTITY_MOUNT, passenger);
|
||||
}
|
||||
}
|
||||
@@ -3049,6 +3056,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3046,6 +3053,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -120,7 +120,7 @@ index b8236e91b4bf204e728cba13c95292329f0058e9..fcc95eaaa8f9160f8a3c2391f6d23c27
|
||||
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
||||
this.passengers = ImmutableList.of();
|
||||
} else {
|
||||
@@ -4987,4 +5002,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4984,4 +4999,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
|
||||
}
|
||||
// Paper end - Expose entity id counter
|
||||
@@ -4140,7 +4140,7 @@ index 151acc43c96b4545ce92d3d559d8e1591874b4b5..73220bd6989855ac82420219c8414216
|
||||
this.getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(0.0D);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
|
||||
index b73dac8f68041f8a2e0752d70cc9d08b5cfd1cde..e78d869069bc018f29c5fbc6a7811806c4b2fb2f 100644
|
||||
index f3c2a2ffb74daa89a516db4c188ce675c79932bf..a695ac9b9e4c3e423d74d082e24928581333947e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
|
||||
@@ -97,12 +97,31 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
|
||||
@@ -4175,7 +4175,7 @@ index b73dac8f68041f8a2e0752d70cc9d08b5cfd1cde..e78d869069bc018f29c5fbc6a7811806
|
||||
this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[]{this.getClass()})).setAlertOthers());
|
||||
this.targetSelector.addGoal(2, new Shulker.ShulkerNearestAttackGoal(this));
|
||||
this.targetSelector.addGoal(3, new Shulker.ShulkerDefenseAttackGoal(this));
|
||||
@@ -596,7 +615,7 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
|
||||
@@ -601,7 +620,7 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
|
||||
return b0 != 16 && b0 <= 15 ? DyeColor.byId(b0) : null;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ index bab2471616404821671264ccefd729cab8d0bf58..ae75edfaa9e4c72f11fbb7ffc66294be
|
||||
public final boolean spawnNpcs = this.get("spawn-npcs", true);
|
||||
public final boolean pvp = this.get("pvp", true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f4452341be3572129dc8c59bb511ef199ff31938..d98ed16ce24fb82dff5bdccb33fb7936408b8634 100644
|
||||
index 2f0b2807b35c4d3a172e85fb8b60ef8b764ca48e..86843c71839e56e9c67eefc2604d7020688dc6f3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -3249,4 +3249,11 @@ public final class CraftServer implements Server {
|
||||
@@ -3247,4 +3247,11 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
// Paper end
|
||||
|
||||
@@ -5,15 +5,15 @@ Subject: [PATCH] Configurable server mod name
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e6e25ab0f2ec3fa0cfca945c578dfb170de3dc8a..b542683c65baf1a77fcc6c65b30b4181e2305c1c 100644
|
||||
index bebb1f089783ee84faad3ed3b08c40b9fd2518c0..bc90dd132e56dbc445261c27f4cd96a54d1ab8f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1864,7 +1864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1863,7 +1863,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
- return "Purpur"; // Purpur - Purpur > // Pufferfish - Pufferfish > // Paper
|
||||
+ return org.purpurmc.purpur.PurpurConfig.serverModName; // Purpur - Purpur > // Pufferfish - Pufferfish > // Paper
|
||||
- return "Purpur"; // Purpur - Purpur > // Pufferfish > // Paper
|
||||
+ return org.purpurmc.purpur.PurpurConfig.serverModName; // Purpur - Purpur > // Pufferfish > // Paper
|
||||
}
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Lagging threshold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b542683c65baf1a77fcc6c65b30b4181e2305c1c..f88e61e0017fe3748b29a89d6e6a5b15945a5f90 100644
|
||||
index bc90dd132e56dbc445261c27f4cd96a54d1ab8f1..c58a727c8bbff81e719ee2a3712dd3f397eee53e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -308,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -16,7 +16,7 @@ index b542683c65baf1a77fcc6c65b30b4181e2305c1c..f88e61e0017fe3748b29a89d6e6a5b15
|
||||
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
@@ -1198,6 +1199,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1197,6 +1198,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.recentTps[0] = tps1.getAverage();
|
||||
this.recentTps[1] = tps5.getAverage();
|
||||
this.recentTps[2] = tps15.getAverage();
|
||||
@@ -25,10 +25,10 @@ index b542683c65baf1a77fcc6c65b30b4181e2305c1c..f88e61e0017fe3748b29a89d6e6a5b15
|
||||
}
|
||||
// Paper end - further improve server tick loop
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1a1bdbdacf9568e72abaead46a83cbaeef8eb9f3..4fe75086f76cf1962bd5fdc2779e76e6e8f66ef1 100644
|
||||
index 86843c71839e56e9c67eefc2604d7020688dc6f3..b9aee99b96f46bf32866159325d0f1711156c48e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -3255,5 +3255,10 @@ public final class CraftServer implements Server {
|
||||
@@ -3253,5 +3253,10 @@ public final class CraftServer implements Server {
|
||||
public String getServerName() {
|
||||
return this.getProperties().serverName;
|
||||
}
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f88e61e0017fe3748b29a89d6e6a5b15945a5f90..7a43e724b10f3ab5dbb551d76382778d0d45e95c 100644
|
||||
index c58a727c8bbff81e719ee2a3712dd3f397eee53e..3bf8cea369eec31b59850c0eeabaa053ac9f2e7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1224,11 +1224,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1223,11 +1223,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
// Pufferfish start - tps catchup
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable void damage height and damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index c4e3a662374ca1695c8e66d74a7a625664c160d7..605c15bb3ca7f4c13a7c869ccd61961d5e01937e 100644
|
||||
index 73454dbffd3def4ab40ff215dcbb4a4a7b839e6d..31c51f882fa1e6c45daeb9b8c2cd32388ed2367e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -902,7 +902,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -899,7 +899,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
public void checkBelowWorld() {
|
||||
// Paper start - Configurable nether ceiling damage
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add canSaveToDisk to Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 605c15bb3ca7f4c13a7c869ccd61961d5e01937e..2dcfcc740aab2fe069aff01bff37c1c310203998 100644
|
||||
index 31c51f882fa1e6c45daeb9b8c2cd32388ed2367e..ae0162d881d75e29d662f77e8be7cd5a91df4e2f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -560,6 +560,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -557,6 +557,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ index 039a86034928a5eb7aaa2d7ca76a7bddcca346bd..308f67d0616e2d6bb135258f1fda53cc
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7a43e724b10f3ab5dbb551d76382778d0d45e95c..dc30235821f6e92883dd0864c79aed0e0d10fbee 100644
|
||||
index 3bf8cea369eec31b59850c0eeabaa053ac9f2e7e..bbadd5e2611b919b6931277c0225e5bdc1d3baaf 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -303,7 +303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -30,7 +30,7 @@ index 7a43e724b10f3ab5dbb551d76382778d0d45e95c..dc30235821f6e92883dd0864c79aed0e
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
||||
public static long currentTickLong = 0L; // Paper - track current tick as a long
|
||||
@@ -1079,6 +1079,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1078,6 +1078,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||
private long lastTick = 0;
|
||||
private long catchupTime = 0;
|
||||
@@ -38,7 +38,7 @@ index 7a43e724b10f3ab5dbb551d76382778d0d45e95c..dc30235821f6e92883dd0864c79aed0e
|
||||
public final RollingAverage tps1 = new RollingAverage(60);
|
||||
public final RollingAverage tps5 = new RollingAverage(60 * 5);
|
||||
public final RollingAverage tps15 = new RollingAverage(60 * 15);
|
||||
@@ -1191,14 +1192,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1190,14 +1191,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (++MinecraftServer.currentTick % MinecraftServer.SAMPLE_INTERVAL == 0) {
|
||||
final long diff = currentTime - tickSection;
|
||||
final java.math.BigDecimal currentTps = TPS_BASE.divide(new java.math.BigDecimal(diff), 30, java.math.RoundingMode.HALF_UP);
|
||||
@@ -74,10 +74,10 @@ index 38fe7e5014332f45e41a3d5d91c28dd0acfdc3b0..479657ddef21f0279b361117b82549f7
|
||||
this.values[this.vp++ & 255] = (int)(l * 100L / Runtime.getRuntime().maxMemory());
|
||||
this.repaint();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4fe75086f76cf1962bd5fdc2779e76e6e8f66ef1..fea5724d193b8b7884f9b85eeeb7e8335f73b71a 100644
|
||||
index b9aee99b96f46bf32866159325d0f1711156c48e..22c57a3408f14a64efbcdd6550bf73166f50618e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -3047,6 +3047,7 @@ public final class CraftServer implements Server {
|
||||
@@ -3045,6 +3045,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public double[] getTPS() {
|
||||
return new double[] {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Stop squids floating on top of water
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 2dcfcc740aab2fe069aff01bff37c1c310203998..28e2c99a757b75a0939fe50516592358eff8f719 100644
|
||||
index ae0162d881d75e29d662f77e8be7cd5a91df4e2f..732c2b03aaf03dccc9384b314295994890bd8d20 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4446,6 +4446,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4443,6 +4443,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.yRotO = this.getYRot();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Entities can use portals configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 28e2c99a757b75a0939fe50516592358eff8f719..cdf8c8a571edfa1a54bbcb2e11d69536e7df61bf 100644
|
||||
index 732c2b03aaf03dccc9384b314295994890bd8d20..41a701ad5abf31b20b70e00122204ce4d7ee8200 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3150,7 +3150,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3147,7 +3147,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public void handleInsidePortal(BlockPos pos) {
|
||||
if (this.isOnPortalCooldown()) {
|
||||
this.setPortalCooldown();
|
||||
@@ -17,7 +17,7 @@ index 28e2c99a757b75a0939fe50516592358eff8f719..cdf8c8a571edfa1a54bbcb2e11d69536
|
||||
if (!this.level().isClientSide && !pos.equals(this.portalEntrancePos)) {
|
||||
this.portalEntrancePos = pos.immutable();
|
||||
}
|
||||
@@ -3857,7 +3857,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3854,7 +3854,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
|
||||
@@ -18,10 +18,10 @@ index 9ec6145fe04ec64bbee8ec6a837719caebdbc6f5..358d610ad020cada1bb83e393deeeaae
|
||||
public ClientboundSetTimePacket(long time, long timeOfDay, boolean doDaylightCycle) {
|
||||
this.gameTime = time;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index dc30235821f6e92883dd0864c79aed0e0d10fbee..95e0f93ced1475e00a5b1f35327a5e632c0ccc23 100644
|
||||
index bbadd5e2611b919b6931277c0225e5bdc1d3baaf..c9754dc72abf9fd4ff005b8a1e48fd3ef9bb1ec9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1696,7 +1696,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1695,7 +1695,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long worldTime = level.getGameTime();
|
||||
final ClientboundSetTimePacket worldPacket = new ClientboundSetTimePacket(worldTime, dayTime, doDaylight);
|
||||
for (Player entityhuman : level.players()) {
|
||||
|
||||
@@ -17,10 +17,10 @@ index 27b3093aba19e457c7b83dd42dce4e546761644b..9c335df92b0a6c7705c9def89ba5c320
|
||||
|
||||
if (environment.includeIntegrated) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 95e0f93ced1475e00a5b1f35327a5e632c0ccc23..f5e85d19693271edf9c62f6959b13a8da0152592 100644
|
||||
index c9754dc72abf9fd4ff005b8a1e48fd3ef9bb1ec9..ec863647debbc8d35c724ef1a2beb918e419875b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1053,6 +1053,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1052,6 +1052,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.safeShutdown(waitForShutdown, false);
|
||||
}
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
|
||||
@@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index cdf8c8a571edfa1a54bbcb2e11d69536e7df61bf..72a81ccb270e9cb23bd8324fe4f6d4cea22a0105 100644
|
||||
index 41a701ad5abf31b20b70e00122204ce4d7ee8200..6d81c3ea836be2fdbeaeaf7f46674708ee279ac5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1876,7 +1876,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1873,7 +1873,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return this.isInWater() || flag;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ index 485fa2fecb3d83635757319d70cd8e90f95807c0..3c41a23964b115145d6b14930444f16c
|
||||
// CraftBukkit end
|
||||
this.setServerLevel(worldserver);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 72a81ccb270e9cb23bd8324fe4f6d4cea22a0105..dcbb4d08a365ac5a697d6d69984b916fbc5abcd9 100644
|
||||
index 6d81c3ea836be2fdbeaeaf7f46674708ee279ac5..e2a11e9928e2ad39ce2dca85ada1108884cad568 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3147,12 +3147,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3144,12 +3144,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return Vec3.directionFromRotation(this.getRotationVector());
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Drowning Settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dcbb4d08a365ac5a697d6d69984b916fbc5abcd9..ae97146bf8e86a4be1b5d33f2956b28a2ed50359 100644
|
||||
index e2a11e9928e2ad39ce2dca85ada1108884cad568..6e397dddf129f0e2c598145c0d39f093e7671143 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3396,7 +3396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3393,7 +3393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] API for any mob to burn daylight
|
||||
Co-authored by: Encode42 <me@encode42.dev>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index ae97146bf8e86a4be1b5d33f2956b28a2ed50359..db3bdc0699143b9634226c1c371955ec4ac735c8 100644
|
||||
index 6e397dddf129f0e2c598145c0d39f093e7671143..fce22f388cae1e125528004457e917e3cbc86d38 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -564,6 +564,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -561,6 +561,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add toggle for end portal safe teleporting
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index db3bdc0699143b9634226c1c371955ec4ac735c8..5bdafc37deac75cf6e332ba1094e375031713ca4 100644
|
||||
index fce22f388cae1e125528004457e917e3cbc86d38..31f692bbb67af911dd0563c171ed48ee510fe5bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3221,7 +3221,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3218,7 +3218,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
this.processPortalCooldown();
|
||||
|
||||
@@ -13,7 +13,7 @@ Subject: [PATCH] Shulker spawn from bullet options
|
||||
(7 - 1) / 5.0 = 1.2 1.0 - 1.2 = -0.2 0% (6 other shulkers)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Shulker.java b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
|
||||
index ea09f65e89b2c683c1549146948ff4f5b5073500..bf3c02e78df66ca57773d667350197220df5d2d1 100644
|
||||
index 31284660a9718503a1ce474c56d993de3126a1ea..df944e733ca589d407af3709e0ff025f568600b7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Shulker.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Shulker.java
|
||||
@@ -503,12 +503,21 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
|
||||
@@ -43,7 +43,7 @@ index ea09f65e89b2c683c1549146948ff4f5b5073500..bf3c02e78df66ca57773d66735019722
|
||||
|
||||
if (entityshulker != null) {
|
||||
entityshulker.setVariant(this.getVariant());
|
||||
@@ -615,7 +624,7 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
|
||||
@@ -620,7 +629,7 @@ public class Shulker extends AbstractGolem implements VariantHolder<Optional<Dye
|
||||
|
||||
@Override
|
||||
public Optional<DyeColor> getVariant() {
|
||||
@@ -68,7 +68,7 @@ index 88e1c2431d51d8cdc3d555b711e506648225d289..ac8735cc9d127fc1f867b40d4000c033
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index d1d7e18bde867b53d61350d8503f1f15b7913527..3cdd1f0fa067160f879fb617b81f42678270cde6 100644
|
||||
index 79a93bb2ce4a86586bfac8635706a4c2d1d1f407..1225ffe648086a279c084ce2f18e5f2126660b7c 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -1917,6 +1917,11 @@ public class PurpurWorldConfig {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] UPnP Port Forwarding
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1e3a1792927f42e7597e4cb2067844f45a3f0bfb..4abb9ecea550d3b01520c914fa06d0608862d694 100644
|
||||
index f12f3ce7a5f8c5d3fffcf317e4e27ddef3f31c48..fcafebea3eeee4800e7a695d6d704d2a5e353a8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -310,6 +310,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -16,7 +16,7 @@ index 1e3a1792927f42e7597e4cb2067844f45a3f0bfb..4abb9ecea550d3b01520c914fa06d060
|
||||
|
||||
public volatile Thread shutdownThread; // Paper
|
||||
public volatile boolean abnormalExit = false; // Paper
|
||||
@@ -973,6 +974,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -972,6 +973,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
MinecraftTimings.stopServer(); // Paper
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Give bee counts in beehives to Purpur clients
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 801a51b22b3c7821c9a38761d7b5c409df537bd6..f30935957cb210fb725172d498b743d672b66f67 100644
|
||||
index fcafebea3eeee4800e7a695d6d704d2a5e353a8b..87a0bd56a75f10bdea9db29aaf0b6c0760fb195c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1064,6 +1064,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1063,6 +1063,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
org.purpurmc.purpur.task.BossBarTask.stopAll(); // Purpur
|
||||
|
||||
@@ -7,10 +7,10 @@ Paper patches RNG maniplulation by using a shared (and locked) random source.
|
||||
This comes with a performance gain, but technical players may prefer the ability to manipulate RNG.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5bdafc37deac75cf6e332ba1094e375031713ca4..e0929385a6b218ea654f552bed531f116d629274 100644
|
||||
index 31f692bbb67af911dd0563c171ed48ee510fe5bf..6a3fa8bec23e2405091eae560c1edef02023a8a9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -599,7 +599,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -596,7 +596,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.bb = Entity.INITIAL_AABB;
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.nextStep = 1.0F;
|
||||
@@ -33,7 +33,7 @@ index 2ec8a55650beff50676759617896da2db09dddc0..cba0823bfd10a3e7fd3a7548b9cc11a7
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 453d4b1c1d6b9a1521ce7a2e179dfcec0bf52a3c..c4174f1f3e6993a38cdb3cbd57553af9807a327b 100644
|
||||
index c6a19e70cbe90546d17c3e3f3371db40af6cf204..e4fd299c419dd5309b74eec5e00de6461613bf40 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -204,9 +204,11 @@ public class PurpurWorldConfig {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Allow custom ChatDecorators
|
||||
Requires NMS to utilize. I'll write an API for this once our upstreams calm down with the changes.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f30935957cb210fb725172d498b743d672b66f67..f52cb2a78e1fc7fb0c9a08b51474c747feea3c65 100644
|
||||
index 87a0bd56a75f10bdea9db29aaf0b6c0760fb195c..48f4122696dfb9ebc6c09b0036f5fa3591ce7c5e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2848,6 +2848,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2847,6 +2847,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
new com.google.common.util.concurrent.ThreadFactoryBuilder().setDaemon(true).setNameFormat("Async Chat Thread - #%d").setUncaughtExceptionHandler(new net.minecraft.DefaultUncaughtExceptionHandlerWithName(net.minecraft.server.MinecraftServer.LOGGER)).build()); // Paper
|
||||
|
||||
public ChatDecorator getChatDecorator() {
|
||||
|
||||
@@ -56,10 +56,10 @@ index 3e2d5dcd62775b6ed7c0ce0ba51a71b635b1d644..166cd0f8e72189d10e56cd7bc095409a
|
||||
} catch (Exception exception) {
|
||||
label25:
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a20fea46f 100644
|
||||
index 48f4122696dfb9ebc6c09b0036f5fa3591ce7c5e..6e996eef388bb154fde7ae285375900e9e7a2f6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1430,7 +1430,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1429,7 +1429,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
try {
|
||||
for (;;) {
|
||||
boolean moreTasks = this.tickMidTickTasks();
|
||||
@@ -1457,7 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1456,7 +1456,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
@@ -77,7 +77,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
}
|
||||
}
|
||||
// Paper end - execute chunk tasks mid tick
|
||||
@@ -1532,15 +1532,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1531,15 +1531,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -96,7 +96,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
// Paper end
|
||||
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
|
||||
|
||||
@@ -1577,9 +1577,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1576,9 +1576,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -108,7 +108,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
// Paper end
|
||||
// Paper start - Server Tick Events
|
||||
long endTime = System.nanoTime();
|
||||
@@ -1604,7 +1604,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1603,7 +1603,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.logTickTime(l - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -117,7 +117,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
}
|
||||
|
||||
private int computeNextAutosaveInterval() {
|
||||
@@ -1666,9 +1666,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1665,9 +1665,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
|
||||
entityplayer.connection.suspendFlushing();
|
||||
});
|
||||
@@ -129,7 +129,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
// Paper start - Folia scheduler API
|
||||
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
|
||||
getAllLevels().forEach(level -> {
|
||||
@@ -1685,21 +1685,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1684,21 +1684,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
this.profiler.push("commandFunctions");
|
||||
@@ -156,7 +156,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
// Paper start - Perf: Optimize time updates
|
||||
for (final ServerLevel level : this.getAllLevels()) {
|
||||
@@ -1719,7 +1719,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1718,7 +1718,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
// Paper end - Perf: Optimize time updates
|
||||
@@ -165,7 +165,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
|
||||
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
|
||||
Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
|
||||
@@ -1745,14 +1745,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1744,14 +1744,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.profiler.push("tick");
|
||||
|
||||
try {
|
||||
@@ -182,7 +182,7 @@ index f52cb2a78e1fc7fb0c9a08b51474c747feea3c65..331df0f5e5ffcc5d82d712b48b47269a
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
|
||||
|
||||
@@ -1767,24 +1767,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1766,24 +1766,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
this.profiler.popPush("connection");
|
||||
@@ -319,7 +319,7 @@ index 28d05b46952397bb664a1c8dae71816cafee89ce..c6c4d6cf59742b555af5469eaf751ebe
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 097f6eb96c2df203565a0c50aba6221e67a7e026..13ba576ad447a8bbc0712126ec86524f5bbd9a6d 100644
|
||||
index 1cf8c819c0d7776c3b33d6594ca81abe3c2a719d..bbc3153379d7da8b4d91c49a3ba83d4415a7671a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -281,10 +281,10 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -732,7 +732,7 @@ index fcdb9bde8e1605e30dde3e580491522d4b62cdc0..7094701d213c73ba47ace806962244c1
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 1d254867e7fc69da4306265f6f4e6beb80de2783..2ab6a1bedcdbdb6adc6030ea863bde85ec297e89 100644
|
||||
index 1b6701b3e844610a443d85e7fe387860443a0ee4..81a38b3384f6c0111d3e10397d21aba3f2d57325 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1313,15 +1313,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@@ -89,10 +89,10 @@ index 821dc4aeaf48460000682604fba51b340b9738e7..3aa2ce6a2a3d3cdfc372a60419a09f49
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039691c3094 100644
|
||||
index 6e996eef388bb154fde7ae285375900e9e7a2f6c..1c416ff1bb7cdbf361c096987705bc55e9837dab 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -342,13 +342,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -341,13 +341,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||
super("Server");
|
||||
SERVER = this; // Paper - better singleton
|
||||
@@ -112,7 +112,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
this.random = RandomSource.create();
|
||||
this.port = -1;
|
||||
this.levels = Maps.newLinkedHashMap();
|
||||
@@ -967,9 +967,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -966,9 +966,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// Paper end
|
||||
// CraftBukkit end
|
||||
@@ -124,7 +124,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1224,20 +1224,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1223,20 +1223,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
boolean flag = i == 0L;
|
||||
|
||||
@@ -150,7 +150,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
this.mayHaveDelayedTasks = true;
|
||||
this.delayedTasksMaxNextTickTimeNanos = Math.max(Util.getNanos() + i, this.nextTickTimeNanos);
|
||||
// Pufferfish start - tps catchup
|
||||
@@ -1258,8 +1258,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1257,8 +1257,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickRateManager.endTickWork();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
@@ -1485,7 +1485,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1484,7 +1484,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
|
||||
@@ -170,7 +170,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
super.doRunTask(ticktask);
|
||||
}
|
||||
|
||||
@@ -1558,7 +1558,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1557,7 +1557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (playerSaveInterval < 0) {
|
||||
playerSaveInterval = autosavePeriod;
|
||||
}
|
||||
@@ -179,7 +179,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@@ -1573,7 +1573,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1572,7 +1572,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
@@ -188,7 +188,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1586,7 +1586,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1585,7 +1585,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
// Paper end - Server Tick Events
|
||||
@@ -197,7 +197,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
|
||||
@@ -1602,7 +1602,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1601,7 +1601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
tickTimes60s.add(this.tickCount, j);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickTime(l - i);
|
||||
@@ -206,7 +206,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
||||
}
|
||||
@@ -1684,11 +1684,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1683,11 +1683,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -220,7 +220,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1731,18 +1731,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1730,18 +1730,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
|
||||
@@ -244,7 +244,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
@@ -1760,17 +1760,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1759,17 +1759,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.playerList.tick();
|
||||
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -1778,7 +1778,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1777,7 +1777,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
|
||||
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||
@@ -1786,7 +1786,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1785,7 +1785,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
@@ -284,7 +284,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1796,7 +1796,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1795,7 +1795,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -1804,7 +1804,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1803,7 +1803,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -302,7 +302,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1813,7 +1813,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1812,7 +1812,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.synchronizeTime(worldserver);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
}
|
||||
|
||||
public boolean isNetherEnabled() {
|
||||
@@ -2477,7 +2477,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2476,7 +2476,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -320,7 +320,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
@@ -2717,7 +2717,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2716,7 +2716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
private void startMetricsRecordingTick() {
|
||||
@@ -329,7 +329,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
|
||||
this.executeBlocking(() -> {
|
||||
this.saveDebugReport(path.resolve("server"));
|
||||
@@ -2727,40 +2727,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2726,40 +2726,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.willStartRecordingMetrics = false;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ index 331df0f5e5ffcc5d82d712b48b47269a20fea46f..c2efe364e3b7d87bb67e48d24c6bf039
|
||||
}
|
||||
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
@@ -2809,15 +2809,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2808,15 +2808,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public boolean isTimeProfilerRunning() {
|
||||
@@ -477,7 +477,7 @@ index c6c4d6cf59742b555af5469eaf751ebef753e249..06554a000da1f6ba7360fa907deeead7
|
||||
|
||||
public boolean hasWork() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 13ba576ad447a8bbc0712126ec86524f5bbd9a6d..897ad16faffcf10a352a49c87d1d5f44f59d5491 100644
|
||||
index bbc3153379d7da8b4d91c49a3ba83d4415a7671a..6167ffb1263a1a65b582b7d295d1d77ef38c3ee3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -264,16 +264,16 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@@ -1095,10 +1095,10 @@ index 2e6e8eac987c4ef6b2dcd3de592d8a51d2b29792..863343a87fe34d72f04af89d75268b47
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf9f5ac9d1 100644
|
||||
index 6a3fa8bec23e2405091eae560c1edef02023a8a9..eb36f7a9e0f0def9a42947e3b056e6986a57efd9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -851,7 +851,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -848,7 +848,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit end
|
||||
|
||||
public void baseTick() {
|
||||
@@ -1107,7 +1107,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups
|
||||
this.feetBlockState = null;
|
||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||
@@ -912,7 +912,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -909,7 +909,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
this.firstTick = false;
|
||||
@@ -1116,7 +1116,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
}
|
||||
|
||||
public void setSharedFlagOnFire(boolean onFire) {
|
||||
@@ -1132,7 +1132,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1129,7 +1129,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1125,7 +1125,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
@@ -1141,7 +1141,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1138,7 +1138,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Paper start - ignore movement changes while inactive.
|
||||
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||
setDeltaMovement(Vec3.ZERO);
|
||||
@@ -1134,7 +1134,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
return;
|
||||
}
|
||||
// Paper end
|
||||
@@ -1162,8 +1162,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1159,8 +1159,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||
}
|
||||
|
||||
@@ -1145,7 +1145,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
||||
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
||||
|
||||
@@ -1182,7 +1182,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1179,7 +1179,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition);
|
||||
if (this.isRemoved()) {
|
||||
@@ -1154,7 +1154,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
} else {
|
||||
if (this.horizontalCollision) {
|
||||
Vec3 vec3d2 = this.getDeltaMovement();
|
||||
@@ -1320,7 +1320,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1317,7 +1317,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||
}
|
||||
|
||||
@@ -1163,7 +1163,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
}
|
||||
}
|
||||
// Paper start - detailed watchdog information
|
||||
@@ -3188,7 +3188,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3185,7 +3185,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
|
||||
|
||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||
@@ -1172,7 +1172,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
this.portalTime = i;
|
||||
// Paper start - Add EntityPortalReadyEvent
|
||||
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
||||
@@ -3206,7 +3206,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3203,7 +3203,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
} // Paper - Add EntityPortalReadyEvent
|
||||
// CraftBukkit end
|
||||
@@ -1181,7 +1181,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
}
|
||||
|
||||
this.isInsidePortal = false;
|
||||
@@ -3681,14 +3681,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3678,14 +3678,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// Paper end - Fix item duplication and teleport issues
|
||||
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
|
||||
@@ -1198,7 +1198,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
|
||||
|
||||
if (shapedetectorshape == null) {
|
||||
@@ -3727,7 +3727,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3724,7 +3724,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.unRide();
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -1207,7 +1207,7 @@ index e0929385a6b218ea654f552bed531f116d629274..b60796b736d2992a192b58b98a2becbf
|
||||
// Paper start - Fix item duplication and teleport issues
|
||||
if (this instanceof Mob) {
|
||||
((Mob) this).dropLeash(true, true); // Paper drop lead
|
||||
@@ -3754,10 +3754,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3751,10 +3751,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
this.removeAfterChangingDimensions();
|
||||
@@ -1821,7 +1821,7 @@ index 28ef910885dbd48965fba6f08cec412697b1b7f0..02dae407069a0200e271cc9c6f3ec6ff
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 2ab6a1bedcdbdb6adc6030ea863bde85ec297e89..0510ab6d164eacb8cede544b98713a132f83002d 100644
|
||||
index 81a38b3384f6c0111d3e10397d21aba3f2d57325..c37b1fb81e6e8a8af5d17420892ee930b31ca019 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1310,9 +1310,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
@@ -36,10 +36,10 @@ index b863249ff7e13cf4939c8961601f0564c62fd661..bdcfd80f937c34956911373905d66424
|
||||
|
||||
this.writeId(BuiltInRegistries.ITEM, item);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c2efe364e3b7d87bb67e48d24c6bf039691c3094..ac6aec92248aebe3371a72ffd36fc6e784a52c44 100644
|
||||
index 1c416ff1bb7cdbf361c096987705bc55e9837dab..0dc5b32fbd3b3d9bb1189f46aab32057f30b18d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1722,6 +1722,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1721,6 +1721,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
|
||||
|
||||
@@ -5,18 +5,18 @@ Subject: [PATCH] Fire Immunity API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b60796b736d2992a192b58b98a2becbf9f5ac9d1..a0281bf4610452b54ca01dc31be01367efc54c76 100644
|
||||
index eb36f7a9e0f0def9a42947e3b056e6986a57efd9..bf33c028ced7c3a4e76e9ccc9d1c12877456219c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -423,6 +423,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
private UUID originWorld;
|
||||
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
|
||||
public boolean fixedPose = false; // Paper - Expand Pose API
|
||||
@@ -426,6 +426,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public boolean activatedPriorityReset = false; // Pufferfish - DAB
|
||||
public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // Pufferfish - DAB (golf score)
|
||||
public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // Pufferfish - reduce entity allocations
|
||||
+ public @Nullable Boolean immuneToFire = null; // Purpur - Fire immune API
|
||||
|
||||
public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
this.origin = location.toVector();
|
||||
@@ -1818,7 +1819,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -1815,7 +1816,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean fireImmune() {
|
||||
@@ -25,7 +25,7 @@ index b60796b736d2992a192b58b98a2becbf9f5ac9d1..a0281bf4610452b54ca01dc31be01367
|
||||
}
|
||||
|
||||
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
|
||||
@@ -2507,6 +2508,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2504,6 +2505,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
nbttagcompound.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -37,7 +37,7 @@ index b60796b736d2992a192b58b98a2becbf9f5ac9d1..a0281bf4610452b54ca01dc31be01367
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2654,6 +2660,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2651,6 +2657,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to teleport to spawn on nether ceiling damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a0281bf4610452b54ca01dc31be01367efc54c76..e3322c3263280a8e206af7a84db3518ef0916439 100644
|
||||
index bf33c028ced7c3a4e76e9ccc9d1c12877456219c..a83a6cd64345ff0d14e4dfad01566d8dc86c8416 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -926,6 +926,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -923,6 +923,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
|
||||
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
||||
// Paper end - Configurable nether ceiling damage
|
||||
@@ -17,7 +17,7 @@ index a0281bf4610452b54ca01dc31be01367efc54c76..e3322c3263280a8e206af7a84db3518e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 92d16b3c5f2170c30019c093ca81aa85c92d0828..029e989caeb427997821216d14ef03b2099bcd58 100644
|
||||
index 17894a054e67173e138cff2190c77c0dad94ef32..c620601e8c6b9cc6a82011a61ce2fcedda94dac4 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -417,6 +417,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
Reference in New Issue
Block a user