Skip to content

Commit

Permalink
Make Photographer invulnerable
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Aug 18, 2023
1 parent 6326dde commit 4ac26dd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions patches/server/0118-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1132,10 +1132,10 @@ index 0000000000000000000000000000000000000000..852f2098d93d4437fe79af06e454d849
+}
diff --git a/src/main/java/top/leavesmc/leaves/replay/ServerPhotographer.java b/src/main/java/top/leavesmc/leaves/replay/ServerPhotographer.java
new file mode 100644
index 0000000000000000000000000000000000000000..6579349b29491d3f8d86ad39312e51ce9c0fc587
index 0000000000000000000000000000000000000000..ceac26080c5378d0e0fdd1bbda1ca26ead55b4c6
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/replay/ServerPhotographer.java
@@ -0,0 +1,197 @@
@@ -0,0 +1,211 @@
+package top.leavesmc.leaves.replay;
+
+import com.mojang.authlib.GameProfile;
Expand Down Expand Up @@ -1240,6 +1240,20 @@ index 0000000000000000000000000000000000000000..6579349b29491d3f8d86ad39312e51ce
+ remove(true);
+ }
+
+ @Override
+ public boolean isInvulnerableTo(@NotNull DamageSource damageSource) {
+ return true;
+ }
+
+ @Override
+ public boolean hurt(@NotNull DamageSource source, float amount) {
+ return false;
+ }
+
+ @Override
+ public void setHealth(float health) {
+ }
+
+ @NotNull
+ @Override
+ public ServerStatsCounter getStats() {
Expand Down

0 comments on commit 4ac26dd

Please sign in to comment.