Skip to content

Commit

Permalink
Update Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Feb 21, 2024
1 parent 68b0d86 commit 55b133a
Show file tree
Hide file tree
Showing 35 changed files with 131 additions and 131 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ version=1.20.4-R0.1-SNAPSHOT
mcVersion=1.20.4
packageVersion=1_20_R3
org.gradle.jvmargs=-Xmx2G
paperRef=cde5587e58f08ce2d8875bb9d13a4be56825e353
paperRef=4939f8711884901ddf1c56337f606de71cdae78d
preVersion=false
updatingMinecraft=false
4 changes: 2 additions & 2 deletions patches/api/0001-Leaves-Server-Config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Server Config


diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 9af4bc16da09e59009c47911219e99450cdf2aa5..2d59fffd32299af90c7fa9579d8ce667ec9642b2 100644
index b4f8281d3797ec825a7671f38077cd65d5a1d76e..127a59fdf5318f6cb22b159fc5a5089d3ed2ac96 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2197,6 +2197,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2213,6 +2213,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
throw new UnsupportedOperationException("Not supported yet.");
}
// Paper end
Expand Down
12 changes: 6 additions & 6 deletions patches/api/0003-Add-fakeplayer-api.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Add fakeplayer api


diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 48fab492609e0bae459d20cc2eae78b87e37ab75..d3efd7baa57135aafe840f9de06f42b73e1e4447 100644
index ca27559cf4aa1c2e44fdca2022e213b1b1c80f4e..95683959badb5242a05157cd2f7c867d94045f6c 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -58,6 +58,7 @@ import org.jetbrains.annotations.Contract;
@@ -59,6 +59,7 @@ import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import io.papermc.paper.util.JarManifests; // Paper
+import top.leavesmc.leaves.entity.BotManager;

/**
* Represents the Bukkit core, for version and Server singleton handling
@@ -2838,6 +2839,17 @@ public final class Bukkit {
@@ -2858,6 +2859,17 @@ public final class Bukkit {
}
// Paper end - Folia region threading API

Expand All @@ -35,18 +35,18 @@ index 48fab492609e0bae459d20cc2eae78b87e37ab75..d3efd7baa57135aafe840f9de06f42b7
public static Server.Spigot spigot() {
return server.spigot();
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 2d59fffd32299af90c7fa9579d8ce667ec9642b2..c3f30fcf4bafd61331aeffab9539c86a0220f85d 100644
index 127a59fdf5318f6cb22b159fc5a5089d3ed2ac96..3af4b686076a3963a95f4768101f382dfa63625c 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -58,6 +58,7 @@ import org.bukkit.util.CachedServerIcon;
@@ -59,6 +59,7 @@ import org.bukkit.util.CachedServerIcon;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import top.leavesmc.leaves.entity.BotManager;

/**
* Represents a server implementation.
@@ -2489,4 +2490,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2505,4 +2506,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
// Paper end - Folia region threading API
Expand Down
8 changes: 4 additions & 4 deletions patches/api/0009-Force-peaceful-mode-switch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Force peaceful mode switch


diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index efa2043e044b0e461780e808c347d6ec00f6da0a..359e96f0fc9b9a909351478a0f30e441004c9b3e 100644
index c5fe36050eeaff80cfb989fe2f38370215af6fe5..37b96ba07ecd03fafd5c42ce8ab4a764390ae9ee 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -4240,6 +4240,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
@@ -4281,6 +4281,12 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
void setSendViewDistance(int viewDistance);
// Paper end - view distance api

Expand All @@ -19,5 +19,5 @@ index efa2043e044b0e461780e808c347d6ec00f6da0a..359e96f0fc9b9a909351478a0f30e441
+ // Leaves end - unsupported settings
+
/**
* Represents various map environment types that a world may be
*/
* Gets all generated structures that intersect the chunk at the given
* coordinates. <br>
12 changes: 6 additions & 6 deletions patches/api/0010-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ Subject: [PATCH] Replay Mod API


diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 7b5bb4b8075206c4e8a6854e42ab11e571aaf0b2..13c64a50e1dbdec5b621d059b37d67d728669bd4 100644
index 95683959badb5242a05157cd2f7c867d94045f6c..094894812b693a33d8dff4d12e3722441734e358 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -59,6 +59,7 @@ import org.jetbrains.annotations.NotNull;
@@ -60,6 +60,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import io.papermc.paper.util.JarManifests; // Paper
import top.leavesmc.leaves.entity.BotManager;
+import top.leavesmc.leaves.entity.PhotographerManager;

/**
* Represents the Bukkit core, for version and Server singleton handling
@@ -2849,6 +2850,11 @@ public final class Bukkit {
@@ -2869,6 +2870,11 @@ public final class Bukkit {
return server.getBotManager();
}
// Leaves end - Bot API
Expand All @@ -29,18 +29,18 @@ index 7b5bb4b8075206c4e8a6854e42ab11e571aaf0b2..13c64a50e1dbdec5b621d059b37d67d7
@NotNull
public static Server.Spigot spigot() {
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index c3f30fcf4bafd61331aeffab9539c86a0220f85d..0162f771532a6899a60dc56b2effdd259fd3b2e4 100644
index 3af4b686076a3963a95f4768101f382dfa63625c..edbcf063790cb2e86c176f6b20a272b2d813b64b 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -59,6 +59,7 @@ import org.jetbrains.annotations.Contract;
@@ -60,6 +60,7 @@ import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import top.leavesmc.leaves.entity.BotManager;
+import top.leavesmc.leaves.entity.PhotographerManager;

/**
* Represents a server implementation.
@@ -2499,4 +2500,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2515,4 +2516,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
@NotNull BotManager getBotManager();
// Leaves end - Bot API
Expand Down
14 changes: 7 additions & 7 deletions patches/server/0001-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 376e8983fdfdbb6c3e5fd8ad0f6a05e655b622bf..f5c83d033a8163786f8f7e98655e65bb606bc9dc 100644
index ce3747d8d2a8f4327766cf23d5aaa72cfcb380bc..25408f536cef272f2457e29fe4bff98fa285f363 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
Expand All @@ -23,7 +23,7 @@ index 376e8983fdfdbb6c3e5fd8ad0f6a05e655b622bf..f5c83d033a8163786f8f7e98655e65bb
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -57,19 +61,29 @@ dependencies {
@@ -58,19 +62,29 @@ dependencies {
}

val craftbukkitPackageVersion = "1_20_R3" // Paper
Expand Down Expand Up @@ -55,7 +55,7 @@ index 376e8983fdfdbb6c3e5fd8ad0f6a05e655b622bf..f5c83d033a8163786f8f7e98655e65bb
"Implementation-Vendor" to date, // Paper
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
@@ -153,7 +167,7 @@ fun TaskContainer.registerRunTask(
@@ -154,7 +168,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) {
Expand Down Expand Up @@ -153,7 +153,7 @@ index 4b002e8b75d117b726b0de274a76d3596fce015b..9ce4d3d96d2d5fbde1f0af599209c6c5
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 90ae7e8c81f6a9ede8aeaeec3bf784023522cefc..b6058a9a51f0be9cf36e3226023e6b2f61c7e82b 100644
index d06185566b447c432d4dc2e3ba04d121bcdbc71b..41ae5cccc1388c27a88ab9d142d3e4834c5ab97d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1855,7 +1855,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Expand All @@ -166,7 +166,7 @@ index 90ae7e8c81f6a9ede8aeaeec3bf784023522cefc..b6058a9a51f0be9cf36e3226023e6b2f

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 6de6dad36203479677a29ad61e21bc369d4e5513..b164b09c90b607262938f3c2552d6b5790c27786 100644
index 68d268b6fff126e8645b6deec3fb549ea2286b77..1363d76e5546d1bb57f06fceb57196da459f962e 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -218,10 +218,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand All @@ -183,10 +183,10 @@ index 6de6dad36203479677a29ad61e21bc369d4e5513..b164b09c90b607262938f3c2552d6b57
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
this.setMotd(dedicatedserverproperties.motd);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b83c2f1e0ea117eecda94cb51b0ea5bba4d7ab5e..b0b66b9bf0a66c69967b792d0136c39d4036c191 100644
index 9f7ed337463cc9bb370a5541d9de5cd8f9c1a78a..b5af2a4608a5871916fe28fff3b040ad7528cfdf 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
@@ -266,7 +266,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
Expand Down
16 changes: 8 additions & 8 deletions patches/server/0002-Delete-Timings.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ index 41ae5cccc1388c27a88ab9d142d3e4834c5ab97d..61e0e14b74c6585a9d157cae3db9c5c3
this.profiler.popPush("send chunks");
iterator = this.playerList.getPlayers().iterator();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 94b0bb1999b47f9777050753d6aff2bc4986d48c..d562b9ce89e510584cf8efc25302a18f6dbf2f2d 100644
index 1363d76e5546d1bb57f06fceb57196da459f962e..d0cf730f175c707b50577b7080bd81cf045ed980 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -58,7 +58,6 @@ import org.apache.logging.log4j.Level;
Expand Down Expand Up @@ -1575,18 +1575,18 @@ index 6934e9dac0d69c043b73b7c46d59f2d39b37c67f..8e43a6817e9101b6dcc956e3b6f4bcff

} else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a7e40f72a3b56916620a7f089410ec3a6db0cffc..3ac6943913c887b14078aabb2581f7f16deb4b4a 100644
index ab5b259d8f72022c875cae73be25fe2da346c6b3..e1fb72685134611a545bc2921f2bf3e0cc5415f5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2398,7 +2398,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2394,7 +2394,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

public void handleCommand(String s) { // Paper - private -> public
org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
- co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);

@@ -2408,20 +2407,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2404,20 +2403,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.cserver.getPluginManager().callEvent(event);

if (event.isCancelled()) {
Expand Down Expand Up @@ -1664,10 +1664,10 @@ index 09e8445a3f8c6b3ebc852a75a9a25b41a51ba659..22d19f1ca47a79be2c41775c5564535b
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6523795e715e5d472739e9bc6433143115c3de8f..179d96358f935a7717c6a7a4cd6e64b60d76bb34 100644
index aceee33eebd4d5f89e62a42910ec51843f33843b..371cd5423f0e8f84b5ddef8f1d98e4889b1b4361 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -141,7 +141,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@@ -142,7 +142,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end

Expand Down Expand Up @@ -2093,10 +2093,10 @@ index b3e1adeb932da9b3bed16acd94e2f16da48a7c72..e9798517b9211c50a20ea5c69603aab3
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 8036ed91714d638eb2a8e8c2bea4bf62bc18cb57..2a84a653f8b10525f9f6667273295cf92ed71cb1 100644
index 1324f05de8106032ce290e928cf106fb4f450517..3fb07dae586c5511cb048b20264072bf6db54df8 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -212,7 +212,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -217,7 +217,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
// Paper start
@Override
public void reportTimings() {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0003-Leaves-Server-Utils.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ index 46954db7ecd35ac4018fdf476df7c8020d7ce6c8..044c51ebb058fc36074fd178929e3279
public PlayerAreaMap() {
super();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..12e8a6794669496c0fa554be3947fac56f773d5d 100644
index 906eded9a2ab61737a30cfe89292a71237ce4eb7..75d5e255bb166d2ec7325b16e8e5a30b43855276 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
Expand All @@ -42,15 +42,15 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..12e8a6794669496c0fa554be3947fac5

public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
@@ -2476,6 +2477,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2480,6 +2481,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
nbttagcompound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
+ nbttagcompound.put("Leaves.Data", leavesData); // Leaves - leaves ex data
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2623,6 +2625,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2627,6 +2629,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
}
// Paper end
Expand All @@ -62,7 +62,7 @@ index 2c06f3ebf7e1069727387bfc60db30c958c14b5a..12e8a6794669496c0fa554be3947fac5

} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
@@ -4909,4 +4916,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4912,4 +4919,10 @@ 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
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0004-Update-version-fetcher-repo.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..fa446ff1b7284b58ee88566cbbe39d81
if (data == null) {
return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 995ae8f2f76bf0255d7eac4190c5b961bfb17f24..ee26068689b9d35bb2c590dbd77fecd420dda28c 100644
index 3fb07dae586c5511cb048b20264072bf6db54df8..008a3da71071128c6302d881ed51d1d837e17e6f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -481,7 +481,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -496,7 +496,7 @@ public final class CraftMagicNumbers implements UnsafeValues {

@Override
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
Expand Down
Loading

0 comments on commit 55b133a

Please sign in to comment.