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 Oct 1, 2023
1 parent 7582c1a commit efb37ff
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions patches/server/0110-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ index fbd602b5219c0eeefea36dbaca7aae10d483a152..e05620a5fa75e22001511fff205b718b
return false;
}
// Leaves end - bot can't get advancement
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5753f163a46ae86a45cc363d7656841f552e49b9..e63455e3b0911c4b519ed3c3b8025c60f0a4c521 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.messageSignatureCache = MessageSignatureCache.createDefault();
this.chunkSender = new PlayerChunkSender(connection.isMemoryConnection());
// Leaves start - fakeplayer
- if (player instanceof top.leavesmc.leaves.bot.ServerBot) {
+ if (player instanceof top.leavesmc.leaves.bot.ServerBot || player instanceof top.leavesmc.leaves.replay.ServerPhotographer) { // Leaves - and photographer
connection.setListenerForce(this);
} else {
connection.setListener(this);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 234abc2192339c3e28a53561b05578fb0847d5d9..ca079dcd63d076e30a20c9bf09d53df39a478305 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
Expand Down
2 changes: 1 addition & 1 deletion patches/server/0124-Disable-moved-wrongly-threshold.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Disable moved wrongly threshold


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 5753f163a46ae86a45cc363d7656841f552e49b9..a844eb5169d012fc6fe9e9adb1f60ee4846024a3 100644
index e63455e3b0911c4b519ed3c3b8025c60f0a4c521..e651dd7aadd16ae82f3352f0691f5530fd422e57 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -583,7 +583,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down

0 comments on commit efb37ff

Please sign in to comment.