2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: DoctorDark <doctordark11@gmail.com>
|
|
|
|
Date: Wed, 16 Mar 2016 02:21:39 -0500
|
|
|
|
Subject: [PATCH] Configurable end credits
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-11-24 17:58:26 +00:00
|
|
|
index 1b090f2e38a8857ef74403e1f3db8c2ba7127297..bc35bdd9cbd544ae2ab27ad042d7d1b3166db9a6 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-11-24 17:58:26 +00:00
|
|
|
@@ -195,4 +195,10 @@ public class PaperWorldConfig {
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean disableEndCredits;
|
|
|
|
+ private void disableEndCredits() {
|
|
|
|
+ disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false);
|
|
|
|
+ log("End credits disabled: " + disableEndCredits);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-03-16 15:57:51 +00:00
|
|
|
index 25bc0d6a09def9820106bd5889fdcca4aeeba19f..000ea770aeb9510c89d13e31bd9d769f7f884ceb 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
2022-03-16 15:57:51 +00:00
|
|
|
@@ -975,6 +975,7 @@ public class ServerPlayer extends Player {
|
2021-06-11 12:02:28 +00:00
|
|
|
this.unRide();
|
2021-06-11 22:37:16 +00:00
|
|
|
this.getLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
|
2021-06-11 12:02:28 +00:00
|
|
|
if (!this.wonGame) {
|
2021-06-11 22:37:16 +00:00
|
|
|
+ if (level.paperConfig.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits
|
2021-06-11 12:02:28 +00:00
|
|
|
this.wonGame = true;
|
|
|
|
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
|
|
|
|
this.seenCredits = true;
|