Skip to content

Commit

Permalink
Fix replay mod api
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Aug 8, 2023
1 parent b50f77f commit d0e042a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 5 additions & 4 deletions patches/api/0009-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,24 @@ index 0000000000000000000000000000000000000000..4c2ef73e9668918d45d9e3ad250c7c20
+}
diff --git a/src/main/java/top/leavesmc/leaves/replay/BukkitRecorderOption.java b/src/main/java/top/leavesmc/leaves/replay/BukkitRecorderOption.java
new file mode 100644
index 0000000000000000000000000000000000000000..0b4e41f9e2b04d1acf79a89b471528e50cd59a5d
index 0000000000000000000000000000000000000000..cc2deb0bfab358b23ab5c98a9d359e13c6565471
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/replay/BukkitRecorderOption.java
@@ -0,0 +1,16 @@
@@ -0,0 +1,17 @@
+package top.leavesmc.leaves.replay;
+
+public class BukkitRecorderOption {
+
+ // public int recordDistance = -1;
+ public BukkitRecordWeather forceWeather = null;
+ public BukkitRecordWeather forceWeather = BukkitRecordWeather.NULL;
+ public int forceDayTime = -1;
+ public boolean ignoreChat = false;
+ // public boolean ignoreItem = false;
+
+ public enum BukkitRecordWeather {
+ CLEAR,
+ RAIN,
+ THUNDER
+ THUNDER,
+ NULL
+ }
+}
5 changes: 3 additions & 2 deletions patches/server/0118-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -817,10 +817,10 @@ index 0000000000000000000000000000000000000000..2484e036aa87cb40e31b360988e26380
+}
diff --git a/src/main/java/top/leavesmc/leaves/replay/RecorderOption.java b/src/main/java/top/leavesmc/leaves/replay/RecorderOption.java
new file mode 100644
index 0000000000000000000000000000000000000000..87644f60a8215bc4037689fe4155e463eb651dfa
index 0000000000000000000000000000000000000000..104fdef25c4a5f36e8114220c44591cc53a1490b
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/replay/RecorderOption.java
@@ -0,0 +1,54 @@
@@ -0,0 +1,55 @@
+package top.leavesmc.leaves.replay;
+
+import net.minecraft.network.protocol.Packet;
Expand Down Expand Up @@ -855,6 +855,7 @@ index 0000000000000000000000000000000000000000..87644f60a8215bc4037689fe4155e463
+ case RAIN -> RecordWeather.RAIN;
+ case CLEAR -> RecordWeather.CLEAR;
+ case THUNDER -> RecordWeather.THUNDER;
+ case NULL -> null;
+ };
+ return recorderOption;
+ }
Expand Down

0 comments on commit d0e042a

Please sign in to comment.