9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-30 12:29:18 +00:00

feat: update to 1.21.10

This commit is contained in:
MC_XiaoHei
2025-10-08 10:36:40 +08:00
parent 8d6817d12f
commit c57fe207dd
28 changed files with 102 additions and 101 deletions

View File

@@ -1,7 +1,7 @@
group=org.leavesmc.leaves
version=1.21.10-rc1-R0.1-SNAPSHOT
mcVersion=1.21.10-rc1
paperRef=dffe9ec16e647efc2fa63afdb0538c744b9eaa7a
version=1.21.10-R0.1-SNAPSHOT
mcVersion=1.21.10
paperRef=fba780d6a2948d5a42030a80cf79cb49a8472456
preVersion=true
paper.runDisableWatchdog=true

View File

@@ -1,6 +1,6 @@
--- a/paper-api/build.gradle.kts
+++ b/paper-api/build.gradle.kts
@@ -90,19 +_,33 @@
@@ -89,19 +_,33 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
@@ -35,7 +35,7 @@
val outgoingVariants = arrayOf("runtimeElements", "apiElements", "sourcesElements", "javadocElements")
val mainCapability = "${project.group}:${project.name}:${project.version}"
@@ -147,6 +_,16 @@
@@ -146,6 +_,16 @@
}
}
@@ -52,7 +52,7 @@
tasks.jar {
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
into("META-INF/maven/${project.group}/${project.name}")
@@ -166,7 +_,7 @@
@@ -165,7 +_,7 @@
tasks.withType<Javadoc>().configureEach {
val options = options as StandardJavadocDocletOptions
@@ -61,7 +61,7 @@
options.use()
options.isDocFilesSubDirs = true
options.links(
@@ -201,16 +_,18 @@
@@ -198,16 +_,18 @@
}
// workaround for https://github.com/gradle/gradle/issues/4046

View File

@@ -18,7 +18,7 @@
+val leavesMavenPublicUrl = "https://repo.leavesmc.com/snapshots/" // Leaves - build change
dependencies {
mache("io.papermc:mache:1.21.10-rc1+build.5")
mache("io.papermc:mache:1.21.10+build.1")
- paperclip("io.papermc:paperclip:3.0.3")
+ leavesclip("org.leavesmc:leavesclip:3.0.7") // Leaves - build change
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
@@ -42,8 +42,8 @@
+ // Leaves end - build change
+
spigot {
enabled = false
buildDataRef = "436eac9815c211be1a2a6ca0702615f995e81c44"
enabled = true
buildDataRef = "42d18d4c4653ffc549778dbe223f6994a031d69e"
@@ -49,6 +_,7 @@
libraryRepositories.addAll(
"https://repo.maven.apache.org/maven2/",

View File

@@ -18,10 +18,10 @@ index 4b87e48309323faee2bf5cc65428a28d8646ef7a..d129f160acf0da81cadeacab9587d86d
private static final org.slf4j.Logger LOGGER = com.mojang.logging.LogUtils.getLogger();
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 5461b22338858cad3f9b8834bccf4a68f09f8deb..6f1ac9e98f3b206a475ce43a7ca9cfb5aebd0fb6 100644
index fda102773812f239cd8dbbe19f742c9f028422c2..994f730d3cd4c676b00b483c38631eebf34d1143 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1126,7 +1126,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1256,7 +1256,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
LOGGER.info("*************************************************************************************");
LOGGER.info("This is the first time you're starting this server.");
LOGGER.info("It's recommended you read our 'Getting Started' documentation for guidance.");
@@ -30,7 +30,7 @@ index 5461b22338858cad3f9b8834bccf4a68f09f8deb..6f1ac9e98f3b206a475ce43a7ca9cfb5
LOGGER.info("*************************************************************************************");
}
// Paper end - Add onboarding message for initial server start
@@ -1803,7 +1803,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1918,7 +1918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Leaves Utils
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 2f59bd23cb91234a0b176ade028b12e30d6e3159..1b8596d1ac579e0dd90659cbc935a4b36c245c65 100644
index fe4128c66b70672b4aa29c85c7d033f55b1e794c..c1e9c647c9115d1a21d665a90d5ddb0831e64c2b 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -374,6 +374,8 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
@@ -42,7 +42,7 @@ index 2f59bd23cb91234a0b176ade028b12e30d6e3159..1b8596d1ac579e0dd90659cbc935a4b3
public net.minecraft.world.entity.LivingEntity getControllingPassenger() {
return null;
}
@@ -5446,4 +5450,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
@@ -5436,4 +5440,9 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
return ((ServerLevel) this.level()).isPositionEntityTicking(this.blockPosition());
}
// Paper end - Expose entity id counter

View File

@@ -33,10 +33,10 @@ index fb263fa1f30a7dfcb7ec2656abfb38e5fe88eac9..56fd1ed7ccaf96e7eedea60fbdbf7f93
};
}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 6f1ac9e98f3b206a475ce43a7ca9cfb5aebd0fb6..1c7de150f5e829a90d0f7008639e6e95f1486336 100644
index 994f730d3cd4c676b00b483c38631eebf34d1143..cbd5c78fdba6a8ee80a2034c4bf3f487aaaf34b5 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1688,6 +1688,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1803,6 +1803,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profilerFiller.popPush("server gui refresh");

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable trading with the void
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 6c0b1ce3888ab599a84fb4a8ee69a0d6454e50fd..d352c882aaf1cf3593b7ef36e3310e5893a80f88 100644
index 84df4f20c5fc9d557ca93193437ed7cb2e2317b5..a8b58099b559f4099f0d962a44accb3deec26d4a 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -2797,7 +2797,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2804,7 +2804,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Spigot start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
// Paper start - Fix merchant inventory not closing on entity removal

View File

@@ -30,19 +30,19 @@ index c5b3f7544a968f835b13819cc61cfacf06af53a2..d36a33a9ea2cc262f746314eda9770e1
private DisconnectionDetails disconnectionDetails;
private boolean encrypted;
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 1c7de150f5e829a90d0f7008639e6e95f1486336..188ba4003d3522f5a22c025b77dd9a2dab729848 100644
index cbd5c78fdba6a8ee80a2034c4bf3f487aaaf34b5..a84eae3e136cd524bdcc730c0047a6af34309cbf 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -311,6 +311,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private final Set<String> pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
@@ -347,6 +347,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// Paper end - improve tick loop
+ private org.leavesmc.leaves.bot.BotList botList; // Leaves - fakeplayer
+
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.init(); // Paper - rewrite data converter system
AtomicReference<S> atomicReference = new AtomicReference<>();
@@ -928,6 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -980,6 +982,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
@@ -50,7 +50,7 @@ index 1c7de150f5e829a90d0f7008639e6e95f1486336..188ba4003d3522f5a22c025b77dd9a2d
// CraftBukkit start
if (this.server != null) {
this.server.spark.disable(); // Paper - spark
@@ -1432,7 +1435,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1553,7 +1556,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
int i = this.pauseWhenEmptySeconds() * 20;
this.removeDisabledPluginsBlockingSleep(); // Paper - API to allow/disallow tick sleeping
if (i > 0) {
@@ -59,7 +59,7 @@ index 1c7de150f5e829a90d0f7008639e6e95f1486336..188ba4003d3522f5a22c025b77dd9a2d
this.emptyTicks++;
} else {
this.emptyTicks = 0;
@@ -1715,6 +1718,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1830,6 +1833,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void tickConnection() {
this.getConnection().tick();
@@ -67,7 +67,7 @@ index 1c7de150f5e829a90d0f7008639e6e95f1486336..188ba4003d3522f5a22c025b77dd9a2d
}
private void synchronizeTime(ServerLevel level) {
@@ -2831,6 +2835,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2946,6 +2950,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.debugSubscribers;
}
@@ -223,7 +223,7 @@ index ecdb937f08a437a1d2398e49ca835071015844f2..fdda4acec6186c5a0290f3d9895cbcec
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics // Leaves - down
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
index b7c16eeee03ac1183d3d26bd8ee1b13afd620f61..7d0441c5088e0b6f0053ecf0af762bcfe75d77f9 100644
index 09af66f4da588835027f09406c2beb20372eb0e7..f7b3e3496e8ae9928da458f159a29b76179de843 100644
--- a/net/minecraft/server/level/ChunkMap.java
+++ b/net/minecraft/server/level/ChunkMap.java
@@ -1365,6 +1365,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -241,7 +241,7 @@ index b7c16eeee03ac1183d3d26bd8ee1b13afd620f61..7d0441c5088e0b6f0053ecf0af762bcf
}
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index d352c882aaf1cf3593b7ef36e3310e5893a80f88..03a148019735b7dd2c895f8f6ef2e21a8cd27599 100644
index a8b58099b559f4099f0d962a44accb3deec26d4a..868ebe0fd5bde694fe8bef95ebf78051a9187672 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -252,7 +252,7 @@ index d352c882aaf1cf3593b7ef36e3310e5893a80f88..03a148019735b7dd2c895f8f6ef2e21a
@Override
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
@@ -692,6 +693,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -699,6 +700,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.chunkDataController = new ca.spottedleaf.moonrise.patches.chunk_system.io.datacontroller.ChunkDataController((ServerLevel)(Object)this, this.chunkTaskScheduler);
// Paper end - rewrite chunk system
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
@@ -260,7 +260,7 @@ index d352c882aaf1cf3593b7ef36e3310e5893a80f88..03a148019735b7dd2c895f8f6ef2e21a
}
// Paper start
@@ -2282,6 +2284,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2289,6 +2291,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return this.players;
}
@@ -273,7 +273,7 @@ index d352c882aaf1cf3593b7ef36e3310e5893a80f88..03a148019735b7dd2c895f8f6ef2e21a
@Override
public void updatePOIOnBlockStateChange(BlockPos pos, BlockState oldState, BlockState newState) {
Optional<Holder<PoiType>> optional = PoiTypes.forState(oldState);
@@ -2731,6 +2739,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2738,6 +2746,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true
if (entity instanceof ServerPlayer serverPlayer) {
ServerLevel.this.players.add(serverPlayer);
@@ -285,7 +285,7 @@ index d352c882aaf1cf3593b7ef36e3310e5893a80f88..03a148019735b7dd2c895f8f6ef2e21a
if (serverPlayer.isReceivingWaypoints()) {
ServerLevel.this.getWaypointManager().addPlayer(serverPlayer);
}
@@ -2809,6 +2822,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2816,6 +2829,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
ServerLevel.this.getChunkSource().removeEntity(entity);
if (entity instanceof ServerPlayer serverPlayer) {
ServerLevel.this.players.remove(serverPlayer);
@@ -298,7 +298,7 @@ index d352c882aaf1cf3593b7ef36e3310e5893a80f88..03a148019735b7dd2c895f8f6ef2e21a
ServerLevel.this.updateSleepingPlayerList();
}
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index c7706fb03dac73e5938cde734a99fcecfe8935e7..0d859e64119fee5478d4683ec61bfbffee2f7687 100644
index fdf031e2dd5088cc1f4ab7dbc13ab86d0be6f9b2..a064fbca59604ffc274a46ba7069e576807299e8 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -227,7 +227,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -511,7 +511,7 @@ index f9e7532f86122a379692561a639a209a126e8bba..2412f46837e967694222730e68e7d25a
for (WaypointTransmitter waypointTransmitter : this.waypoints) {
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 1b8596d1ac579e0dd90659cbc935a4b36c245c65..24db2acd0f76328fbbd819e4a2931854c86daac2 100644
index c1e9c647c9115d1a21d665a90d5ddb0831e64c2b..28738f13c8fc17386bfafc5eb337b0fca5018c90 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -1186,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name

View File

@@ -6,12 +6,12 @@ Subject: [PATCH] Config to disable method profiler
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index d78c566d282e3be1f793c3d8dbec56f6e3d92c4b..acf1eb032bfaad863ef3627f45c8cd2cbb639772 100644
index a84eae3e136cd524bdcc730c0047a6af34309cbf..5ad76e6483b589d6695ad086755cc9dc0edd9235 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1181,7 +1181,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
lastTick = currentTime;
this.nextTickTimeNanos += l;
@@ -1306,7 +1306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper - improve tick loop - done above
- try (Profiler.Scope scope = Profiler.use(this.createProfiler())) {
+ try (Profiler.Scope scope = org.leavesmc.leaves.LeavesConfig.mics.disableMethodProfiler ? null : Profiler.use(this.createProfiler())) { // Leaves - disable profiler

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Remove lambda from ticking guard
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 5ecbbd9174dae94e0a1964ad29566099f2f8a7e8..99153cbb1de2d6de7289955b24d0e5fe633453d6 100644
index 868ebe0fd5bde694fe8bef95ebf78051a9187672..9c3362e52def414c553fbac22bb8d8304fc3bfd2 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -831,7 +831,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -838,7 +838,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
profilerFiller.push("tick");

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] InstantBlockUpdater Reintroduced
This patch is Powered by Carpet-TIS-Addition(https://github.com/plusls/Carpet-TIS-Addition)
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 99153cbb1de2d6de7289955b24d0e5fe633453d6..5b78140e59eaac82c444707e103d3d7fce303c27 100644
index 9c3362e52def414c553fbac22bb8d8304fc3bfd2..2b7e9b5836d717bfcb34816ef70a6e67c8e3a1f1 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -864,12 +864,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -871,12 +871,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Paper - rewrite chunk system
profilerFiller.pop();
profilerFiller.push("debugSynchronizers");

View File

@@ -31,10 +31,10 @@ index 8d299a75c80fddc61a2aa4dc5b0dc5948aef5a0d..30b681bc234eac8dc44ce3bf6e228171
String string = Optional.ofNullable((String) optionSet.valueOf("world")).orElse(dedicatedServerSettings.getProperties().levelName);
LevelStorageSource levelStorageSource = LevelStorageSource.createDefault(file.toPath());
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index acf1eb032bfaad863ef3627f45c8cd2cbb639772..2bcd2e36c2a934a3b09f2407bd91a4b45989ed74 100644
index 5ad76e6483b589d6695ad086755cc9dc0edd9235..c3c93caab5981d509dd5471419f3d79cdd045f1d 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -247,7 +247,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -242,7 +242,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean isDemo;
private volatile boolean isReady;
private long lastOverloadWarningNanos;

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Catch update suppression crash
diff --git a/net/minecraft/network/PacketProcessor.java b/net/minecraft/network/PacketProcessor.java
index 064c3dea7f1e7fe07f63853532edae6f0a3e4a5c..5b8425a964ff479940fd3a9f4ef3c912b525d93b 100644
index 3e4241976fdfe65bc0aae90a9097770745c0ddf1..8e3e9a8aaee8fd4fbe986f9f079945179017c4f3 100644
--- a/net/minecraft/network/PacketProcessor.java
+++ b/net/minecraft/network/PacketProcessor.java
@@ -70,7 +70,20 @@ public class PacketProcessor implements AutoCloseable {
@@ -97,7 +97,20 @@ public class PacketProcessor implements AutoCloseable {
if (this.listener.shouldHandleMessage(this.packet)) {
try {
this.packet.handle(this.listener);
@@ -30,10 +30,10 @@ index 064c3dea7f1e7fe07f63853532edae6f0a3e4a5c..5b8425a964ff479940fd3a9f4ef3c912
throw PacketUtils.makeReportedException(var3, this.packet, this.listener);
}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index ac3478729259f09c6dc9901f91370a1b5443caf5..3e61922588b9ffd0255581e0efd409bca6d7ddaf 100644
index c3c93caab5981d509dd5471419f3d79cdd045f1d..bb3546bf42189a38014509980e8f25a258cef00a 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1666,7 +1666,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1781,7 +1781,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
serverLevel.tick(hasTimeLeft);
@@ -51,10 +51,10 @@ index ac3478729259f09c6dc9901f91370a1b5443caf5..3e61922588b9ffd0255581e0efd409bc
serverLevel.fillReportDetails(crashReport);
throw new ReportedException(crashReport);
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 7dfdae37e6a87fa116482f35f058340fe1917fc3..5cdc69448b3d054112e4b3950a9aa48c5a50ba0a 100644
index 2b7e9b5836d717bfcb34816ef70a6e67c8e3a1f1..90822a9976a6829fbd4159aef0f2075aaf2f54f7 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -835,6 +835,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -842,6 +842,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (org.leavesmc.leaves.LeavesConfig.performance.remove.tickGuardLambda) {
try {
this.tickNonPassenger(entity); // Leaves - changed
@@ -67,7 +67,7 @@ index 7dfdae37e6a87fa116482f35f058340fe1917fc3..5cdc69448b3d054112e4b3950a9aa48c
if (throwable instanceof ThreadDeath) throw throwable; // Paper
// Paper start - Prevent block entity and entity crashes
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index 1cb033e22240ee4426535bd6db1e59fa97667f59..d305a55802e6d62372262bcde0a6f06ca7ade67a 100644
index 033ea42f807ab1c4373a351bd7662488a959a18c..93dc94ec1e4e93af7ceea21fb01d35ae65b40b92 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -901,6 +901,12 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
@@ -84,7 +84,7 @@ index 1cb033e22240ee4426535bd6db1e59fa97667f59..d305a55802e6d62372262bcde0a6f06c
CrashReport crashReport = CrashReport.forThrowable(var4, "Ticking player");
CrashReportCategory crashReportCategory = crashReport.addCategory("Player being ticked");
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index 770c99f5088757fe163bfc47a834fb6b075a710f..f9f7ec76d195a1134a73e7caa8a8a52a0c466ddd 100644
index ee4bc2a82d577012a9431e558643bb88c571df10..14483297df08ee275d32ab8fab5f9e042ff95be8 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -1364,9 +1364,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Bedrock break list
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 3e61922588b9ffd0255581e0efd409bca6d7ddaf..93590728b582129e189e21726becb98249cbceb9 100644
index bb3546bf42189a38014509980e8f25a258cef00a..a95abb9cf0fdb33e66a1d8db8ad9e4143be319de 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1701,6 +1701,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1816,6 +1816,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
profilerFiller.popPush("server gui refresh");
org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handleTick(tickCount); // Leaves - protocol

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Elytra aeronautics no chunk load
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
index 7d0441c5088e0b6f0053ecf0af762bcfe75d77f9..bbc4ed833c3a789ae6b0dfaa128e66c0112a7027 100644
index f7b3e3496e8ae9928da458f159a29b76179de843..e345ad7d9fb716e45b06be588cfe03b343dc177d 100644
--- a/net/minecraft/server/level/ChunkMap.java
+++ b/net/minecraft/server/level/ChunkMap.java
@@ -862,7 +862,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -27,10 +27,10 @@ index 7d0441c5088e0b6f0053ecf0af762bcfe75d77f9..bbc4ed833c3a789ae6b0dfaa128e66c0
SectionPos lastSectionPos = player.getLastSectionPos();
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 5cdc69448b3d054112e4b3950a9aa48c5a50ba0a..980b06c70e3aa4eb2a462ebf06a4153d91e2b5dc 100644
index 90822a9976a6829fbd4159aef0f2075aaf2f54f7..b3e9eb700d7af3ab0b0c0b05702d9c736f25274b 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -861,6 +861,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -868,6 +868,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
);
profilerFiller.popPush("blockEntities");
@@ -62,7 +62,7 @@ index d8ef2f96772c62cd3ff20ac7ff297d7f8038219b..af98702ff29d400f82a8ae223488f42b
if (!allowMovement) {
io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.CLIPPED_INTO_BLOCK,
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index f9f7ec76d195a1134a73e7caa8a8a52a0c466ddd..1299d200d7fc1e9a9b0c5901940dba2273003e19 100644
index 14483297df08ee275d32ab8fab5f9e042ff95be8..163c0a34c93bbc4f6ede5e3b278c31056783673f 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -1128,7 +1128,13 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name

View File

@@ -80,10 +80,10 @@ index d438e31a082b675d7eb0eead7067a0b92363a9f9..c08f34bc17bec9f73c377b45389a7755
players.add(serverPlayer1);
if (players.size() >= resultLimit) {
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 93590728b582129e189e21726becb98249cbceb9..bf8043c4768a29cf602cf78bcd259c6aff13661e 100644
index a95abb9cf0fdb33e66a1d8db8ad9e4143be319de..10c0a2079df257b4ad38750987d0cb28706a852a 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1578,7 +1578,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1693,7 +1693,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
private ServerStatus.Players buildPlayerStatus() {
@@ -92,7 +92,7 @@ index 93590728b582129e189e21726becb98249cbceb9..bf8043c4768a29cf602cf78bcd259c6a
int maxPlayers = this.getMaxPlayers();
if (this.hidesOnlinePlayers()) {
return new ServerStatus.Players(maxPlayers, players.size(), List.of());
@@ -1810,7 +1810,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1925,7 +1925,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public int getPlayerCount() {
@@ -101,7 +101,7 @@ index 93590728b582129e189e21726becb98249cbceb9..bf8043c4768a29cf602cf78bcd259c6a
}
public String[] getPlayerNames() {
@@ -2034,7 +2034,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2149,7 +2149,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} else {
int i = 0;
@@ -110,7 +110,7 @@ index 93590728b582129e189e21726becb98249cbceb9..bf8043c4768a29cf602cf78bcd259c6a
// Paper start - Expand PlayerGameModeChangeEvent
org.bukkit.event.player.PlayerGameModeChangeEvent event = serverPlayer.setGameMode(gameMode, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.DEFAULT_GAMEMODE, null);
if (event == null || event.isCancelled()) {
@@ -2202,7 +2202,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2317,7 +2317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (Thread.currentThread() != this.serverThread) return; // Paper
// Paper start - we don't need to save everything, just advancements
// this.getPlayerList().saveAll();
@@ -119,7 +119,7 @@ index 93590728b582129e189e21726becb98249cbceb9..bf8043c4768a29cf602cf78bcd259c6a
player.getAdvancements().save();
}
// Paper end - we don't need to save everything, just advancements
@@ -2340,7 +2340,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2455,7 +2455,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
PlayerList playerList = this.getPlayerList();
UserWhiteList whiteList = playerList.getWhiteList();
@@ -280,10 +280,10 @@ index 5a8cd3e6b448a4472092690cf589bca10b142126..8f22d5faf89006153b1fff4ff0b622f8
this.setListData(list);
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 980b06c70e3aa4eb2a462ebf06a4153d91e2b5dc..27606bcb957abe27641010f920deafa05ebee360 100644
index b3e9eb700d7af3ab0b0c0b05702d9c736f25274b..3c1fbd18a50a703a8e60afaf0b1a250118bdf8e7 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -2767,7 +2767,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2774,7 +2774,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (entity instanceof ServerPlayer serverPlayer) {
ServerLevel.this.players.add(serverPlayer);
// Leaves start - skip
@@ -292,7 +292,7 @@ index 980b06c70e3aa4eb2a462ebf06a4153d91e2b5dc..27606bcb957abe27641010f920deafa0
ServerLevel.this.realPlayers.add(serverPlayer);
}
// Leaves end - skip
@@ -2850,7 +2850,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2857,7 +2857,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (entity instanceof ServerPlayer serverPlayer) {
ServerLevel.this.players.remove(serverPlayer);
// Leaves start - skip
@@ -302,7 +302,7 @@ index 980b06c70e3aa4eb2a462ebf06a4153d91e2b5dc..27606bcb957abe27641010f920deafa0
}
// Leaves end - skip
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
index d305a55802e6d62372262bcde0a6f06ca7ade67a..2320849cad7c0ff51e3cabae2be18aec265c8bc6 100644
index 93dc94ec1e4e93af7ceea21fb01d35ae65b40b92..c72d272c6d48d12bda8ee99fafee5d27ac838b83 100644
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -522,7 +522,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc

View File

@@ -54,10 +54,10 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..a6573e327ace16b7ea320eb1440ffcbc
+ public void moonrise$write(final org.leavesmc.leaves.region.IRegionFile regionFile) throws IOException; // Leaves - more region format
}
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
index 9ea2fdfbf328b8bedac48e863021d92d40eae8cc..d925df996a3b1b47969859b9fecee4c8a0b123f2 100644
index 10c0a2079df257b4ad38750987d0cb28706a852a..4debecefc7f8c4cbf4396ec43e17f436c850152f 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -875,10 +875,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -927,10 +927,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
if (flush) {
for (ServerLevel serverLevel : this.getAllLevels()) {

View File

@@ -20,10 +20,10 @@ index 4257c47d33e3773fac766817138cc21c55d9ab76..8638f3f7aa853802a60ddeb681d089e0
+ // Leaves end - servux
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 215350f388d90159456154d5f970a6a89265ebc2..f1715fafe3725bf534298ca3e400f96676725d03 100644
index 3c1fbd18a50a703a8e60afaf0b1a250118bdf8e7..80c57f604ace47ce39c800b78b115efaf320f1e5 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -2288,9 +2288,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2295,9 +2295,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Paper end
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Fix falling block's block location
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index dac749d176c5b0f37d4f3f6e6a157121b96329c2..a93318b4de6b06ed9ec7321fdab869ac53af8506 100644
index 398923e1a1727fd874da37427a362c61c4200464..7eaf45cdb3a8e7090f7ba1ddb7f88704bfb01deb 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -5096,6 +5096,15 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
@@ -5086,6 +5086,15 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
int floor = Mth.floor(x);
int floor1 = Mth.floor(y);
int floor2 = Mth.floor(z);

View File

@@ -86,10 +86,10 @@ index 3092454bf7071deca75fecfc203072593fe5c7e7..c20e12726a020429f36b9fbe0d6da2af
}
}
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index d28fc1496e90dadf13a17dc5849d2f99bee2267a..1e8dc1f8e57ba18fb3446e838858fe3861448e45 100644
index 80c57f604ace47ce39c800b78b115efaf320f1e5..d09b72d878e71a15b85147c4ac58517263bbcb97 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -2475,6 +2475,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2482,6 +2482,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
for (TickingBlockEntity tickingBlockEntity : this.blockEntityTickers) {
BlockPos pos = tickingBlockEntity.getPos();
@@ -111,7 +111,7 @@ index 5493576c54e87823f68bbf8a18441b373aae0461..10d786ef9f29f1af1cb5088f5e054f19
int getContainerSize();
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
index b8ec8fc15092a16a0743bfb537556d8f57cd145a..f500ac59152d9a3b3a6167d3b99e55462c1c32dd 100644
index ad62e33fc75882395e9bfaa497a67a617fda1104..74f8744c473c0424a8e29f5d7b8dd7af8c38e94d 100644
--- a/net/minecraft/world/entity/Entity.java
+++ b/net/minecraft/world/entity/Entity.java
@@ -311,7 +311,7 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
@@ -123,7 +123,7 @@ index b8ec8fc15092a16a0743bfb537556d8f57cd145a..f500ac59152d9a3b3a6167d3b99e5546
private final VecDeltaCodec packetPositionCodec = new VecDeltaCodec();
public boolean hasImpulse;
@Nullable
@@ -5220,6 +5220,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
@@ -5210,6 +5210,19 @@ public abstract class Entity implements SyncedDataHolder, DebugValueSource, Name
this.setBoundingBox(this.makeBoundingBox());
}
// Paper end - Block invalid positions and bounding box

View File

@@ -18,10 +18,10 @@ index 62e2d5704c348955bc8284dc2d54c933b7bcdd06..7ef20f0138fad39a1d23edd7b26ddc88
public void executeAsync(final Runnable runnable) {
MCUtil.scheduleAsyncTask(this.catching(runnable, "asynchronous"));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 29057c66f01a93eb76d57dd505ef9eeaf77d1e7a..a20fa1defa3797a4642376c9c7064f2403177103 100644
index 51cffc9d2eda3ba1746e7b7d01e2936915e66b7e..500ba3cd2bc9c34489dacc49c6bdb7d053e18874 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1020,6 +1020,7 @@ public final class CraftServer implements Server {
@@ -1021,6 +1021,7 @@ public final class CraftServer implements Server {
playerMetadata.removeAll(plugin);
}
// Paper end

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Protocol Core
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a20fa1defa3797a4642376c9c7064f2403177103..7438e23268d2e06bb8d6b1c65f9a49e6d808de24 100644
index 500ba3cd2bc9c34489dacc49c6bdb7d053e18874..a54e471971a554164c3d6d3b5d6e08841e1d0f3f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -484,6 +484,7 @@ public final class CraftServer implements Server {
@@ -485,6 +485,7 @@ public final class CraftServer implements Server {
this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
this.spark = new io.papermc.paper.SparksFly(this); // Paper - spark
@@ -16,7 +16,7 @@ index a20fa1defa3797a4642376c9c7064f2403177103..7438e23268d2e06bb8d6b1c65f9a49e6
}
public boolean getCommandBlockOverride(String command) {
@@ -1027,6 +1028,7 @@ public final class CraftServer implements Server {
@@ -1028,6 +1029,7 @@ public final class CraftServer implements Server {
this.spark.registerCommandBeforePlugins(this); // Paper - spark
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

View File

@@ -44,10 +44,10 @@ index a760b60f6e46fa0dc3293014c979d19f59ea6511..674523b0e2d08b73d10f3bc64c22588c
if (nmsEntity.level() != this.getHandle().getLevel()) {
nmsEntity = nmsEntity.teleport(new TeleportTransition(this.getHandle().getLevel(), nmsEntity, TeleportTransition.DO_NOTHING));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f45321ec434becfb2b45b28a479b819176690e3a..77459f5a37c4388aee5600dd3bf35682a2e70928 100644
index a54e471971a554164c3d6d3b5d6e08841e1d0f3f..269de25a3ae32510d94a24860c2a20717fd491e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -304,6 +304,7 @@ public final class CraftServer implements Server {
@@ -305,6 +305,7 @@ public final class CraftServer implements Server {
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer;
public final io.papermc.paper.SparksFly spark;
private final ServerConfiguration serverConfig = new PaperServerConfiguration();
@@ -55,7 +55,7 @@ index f45321ec434becfb2b45b28a479b819176690e3a..77459f5a37c4388aee5600dd3bf35682
// Paper start - Folia region threading API
private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler();
@@ -485,6 +486,7 @@ public final class CraftServer implements Server {
@@ -486,6 +487,7 @@ public final class CraftServer implements Server {
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
this.spark = new io.papermc.paper.SparksFly(this); // Paper - spark
org.leavesmc.leaves.protocol.core.LeavesProtocolManager.init(); // Leaves - protocol
@@ -63,7 +63,7 @@ index f45321ec434becfb2b45b28a479b819176690e3a..77459f5a37c4388aee5600dd3bf35682
}
public boolean getCommandBlockOverride(String command) {
@@ -1341,7 +1343,7 @@ public final class CraftServer implements Server {
@@ -1342,7 +1344,7 @@ public final class CraftServer implements Server {
return false;
}
@@ -72,7 +72,7 @@ index f45321ec434becfb2b45b28a479b819176690e3a..77459f5a37c4388aee5600dd3bf35682
return false;
}
@@ -2967,4 +2969,11 @@ public final class CraftServer implements Server {
@@ -2966,4 +2968,11 @@ public final class CraftServer implements Server {
public void allowPausing(final Plugin plugin, final boolean value) {
this.console.addPluginAllowingSleep(plugin.getName(), value);
}

View File

@@ -18,10 +18,10 @@ index c0910f908ffad3bb94563836c032bb1d6d50c4ed..ecd25243b55a00d7c8a04385c2695d55
}
// Leaves end - skip bot
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 77459f5a37c4388aee5600dd3bf35682a2e70928..b37eb4e1128b4bad5690c90051cf92c38b3c1008 100644
index 269de25a3ae32510d94a24860c2a20717fd491e2..411706b947ff462f47377e8055e58e7d8e15f2f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -305,6 +305,7 @@ public final class CraftServer implements Server {
@@ -306,6 +306,7 @@ public final class CraftServer implements Server {
public final io.papermc.paper.SparksFly spark;
private final ServerConfiguration serverConfig = new PaperServerConfiguration();
private final org.leavesmc.leaves.entity.bot.CraftBotManager botManager; // Leaves
@@ -29,7 +29,7 @@ index 77459f5a37c4388aee5600dd3bf35682a2e70928..b37eb4e1128b4bad5690c90051cf92c3
// Paper start - Folia region threading API
private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler();
@@ -399,7 +400,7 @@ public final class CraftServer implements Server {
@@ -400,7 +401,7 @@ public final class CraftServer implements Server {
public CraftServer(DedicatedServer console, PlayerList playerList) {
this.console = console;
this.playerList = (DedicatedPlayerList) playerList;
@@ -38,7 +38,7 @@ index 77459f5a37c4388aee5600dd3bf35682a2e70928..b37eb4e1128b4bad5690c90051cf92c3
@Override
public CraftPlayer apply(ServerPlayer player) {
return player.getBukkitEntity();
@@ -2976,4 +2977,11 @@ public final class CraftServer implements Server {
@@ -2975,4 +2976,11 @@ public final class CraftServer implements Server {
return botManager;
}
// Leaves end - Bot API

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Bytebuf API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e38814749b1db0cdb0f8e128b4d16b1735032f47..c06a3ed7a4dc62bd56e8a085c55e30dc7fcd2bdb 100644
index 411706b947ff462f47377e8055e58e7d8e15f2f8..8cb2417afe2cc56c1d8770921e8c811d5bab5e34 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -306,6 +306,7 @@ public final class CraftServer implements Server {
@@ -307,6 +307,7 @@ public final class CraftServer implements Server {
private final ServerConfiguration serverConfig = new PaperServerConfiguration();
private final org.leavesmc.leaves.entity.bot.CraftBotManager botManager; // Leaves
private final org.leavesmc.leaves.entity.photographer.CraftPhotographerManager photographerManager = new org.leavesmc.leaves.entity.photographer.CraftPhotographerManager(); // Leaves
@@ -16,7 +16,7 @@ index e38814749b1db0cdb0f8e128b4d16b1735032f47..c06a3ed7a4dc62bd56e8a085c55e30dc
// Paper start - Folia region threading API
private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler();
@@ -2984,4 +2985,15 @@ public final class CraftServer implements Server {
@@ -2983,4 +2984,15 @@ public final class CraftServer implements Server {
return photographerManager;
}
// Leaves end - replay mod api

View File

@@ -261,10 +261,10 @@ index fbad4a2242aa1ab910b2e2ae4cce973ff63fda84..89d4fa952d072dd6e071dc9eef51f405
} catch (final IOException ex) {
return CompletableFuture.failedFuture(new RuntimeException("Failed to open plugin jar " + inputFile, ex));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c06a3ed7a4dc62bd56e8a085c55e30dc7fcd2bdb..f5b2b716e345ef10d1022b9b9e0641b10bc7730b 100644
index 8cb2417afe2cc56c1d8770921e8c811d5bab5e34..7b6d3710906c4aa88e60ef8435c5188bf8a819e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2972,6 +2972,13 @@ public final class CraftServer implements Server {
@@ -2971,6 +2971,13 @@ public final class CraftServer implements Server {
this.console.addPluginAllowingSleep(plugin.getName(), value);
}

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Config API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f5b2b716e345ef10d1022b9b9e0641b10bc7730b..4483495ae55b1a9ef130b1abd50541042b4f3a0b 100644
index 7b6d3710906c4aa88e60ef8435c5188bf8a819e0..5b92276b462169b7225ec59ae3ffccb67c93b339 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -3003,4 +3003,11 @@ public final class CraftServer implements Server {
@@ -3002,4 +3002,11 @@ public final class CraftServer implements Server {
return internalBytebufHandler;
}
// Leaves end - Bytebuf API

View File

@@ -12,6 +12,7 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.util.StringRepresentable;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.level.NaturalSpawner;
import org.bukkit.Bukkit;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.leavesmc.leaves.protocol.servux.logger.data.MobCapData;
@@ -100,7 +101,7 @@ public abstract class DataLogger<T extends Tag> {
ServerTickRateManager tickManager = server.tickRateManager();
boolean frozen = tickManager.isFrozen();
boolean sprinting = tickManager.isSprinting();
final double mspt = server.tickTimes5s.getAverage();
final double mspt = Bukkit.getAverageTickTime();
double tps = 1000.0D / Math.max(sprinting ? 0.0 : tickManager.millisecondsPerTick(), mspt);
if (frozen) {