From 363950602a6139ab251b864d861b610373360756 Mon Sep 17 00:00:00 2001 From: violetc <58360096+s-yh-china@users.noreply.github.com> Date: Sun, 17 Sep 2023 13:21:10 +0800 Subject: [PATCH] Update replay api --- patches/api/0009-Replay-Mod-API.patch | 6 ++++-- patches/server/0113-Replay-Mod-API.patch | 11 ++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/patches/api/0009-Replay-Mod-API.patch b/patches/api/0009-Replay-Mod-API.patch index 8688b004..f4c432ae 100644 --- a/patches/api/0009-Replay-Mod-API.patch +++ b/patches/api/0009-Replay-Mod-API.patch @@ -50,10 +50,10 @@ index 0b58392263898b4ef7eba8a082cddf74d3c7cd82..9de03cb5217bd9ac73484e1121768bce } diff --git a/src/main/java/top/leavesmc/leaves/entity/Photographer.java b/src/main/java/top/leavesmc/leaves/entity/Photographer.java new file mode 100644 -index 0000000000000000000000000000000000000000..fbc57438293210fa4ee30327e01261db447c9de2 +index 0000000000000000000000000000000000000000..985f8ff42a326d10edb582e5e24947f301fceb0c --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/entity/Photographer.java -@@ -0,0 +1,23 @@ +@@ -0,0 +1,25 @@ +package top.leavesmc.leaves.entity; + +import org.bukkit.entity.Player; @@ -71,6 +71,8 @@ index 0000000000000000000000000000000000000000..fbc57438293210fa4ee30327e01261db + + public void stopRecording(); + ++ public void stopRecording(boolean async); ++ + public void pauseRecording(); + + public void resumeRecording(); diff --git a/patches/server/0113-Replay-Mod-API.patch b/patches/server/0113-Replay-Mod-API.patch index 175be13e..1f4869ef 100644 --- a/patches/server/0113-Replay-Mod-API.patch +++ b/patches/server/0113-Replay-Mod-API.patch @@ -382,10 +382,10 @@ index 8388c2a56cbe531cf5f60a18866c85fad1e23c54..bdd36d58c55a66a9538540fa5c88a294 // Leaves end - add CraftBot diff --git a/src/main/java/top/leavesmc/leaves/entity/CraftPhotographer.java b/src/main/java/top/leavesmc/leaves/entity/CraftPhotographer.java new file mode 100644 -index 0000000000000000000000000000000000000000..7471ad4912009db4bdac74aa1326af2169b20ba6 +index 0000000000000000000000000000000000000000..65fd6fd9e6af4e43268f1f1507a37e1bd95d41b8 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/entity/CraftPhotographer.java -@@ -0,0 +1,63 @@ +@@ -0,0 +1,68 @@ +package top.leavesmc.leaves.entity; + +import net.minecraft.server.level.ServerPlayer; @@ -406,7 +406,12 @@ index 0000000000000000000000000000000000000000..7471ad4912009db4bdac74aa1326af21 + + @Override + public void stopRecording() { -+ this.getHandle().remove(true); ++ this.stopRecording(true); ++ } ++ ++ @Override ++ public void stopRecording(boolean async) { ++ this.getHandle().remove(async); + } + + @Override