2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2016-03-16 07:21:39 +00:00
|
|
|
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
|
2020-11-12 01:48:12 +00:00
|
|
|
index 4bba6977a0287837b8927718c040ac61463f0469..e6e18f309dc09ea9416ea37dcc697ddc2b571a96 100644
|
2016-03-16 07:21:39 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-11-12 01:48:12 +00:00
|
|
|
@@ -149,4 +149,10 @@ public class PaperWorldConfig {
|
2019-04-24 02:34:11 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-16 07:21:39 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean disableEndCredits;
|
|
|
|
+ private void disableEndCredits() {
|
|
|
|
+ disableEndCredits = getBoolean("game-mechanics.disable-end-credits", false);
|
|
|
|
+ log("End credits disabled: " + disableEndCredits);
|
|
|
|
+ }
|
|
|
|
}
|
2021-03-16 07:19:45 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
|
|
index 0ff92d701d6ee5ce56eec624eece11de15195b41..a9eb414843381e7697c46af4b68f61b68755afde 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java
|
|
|
|
@@ -190,7 +190,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2020-08-25 02:22:08 +00:00
|
|
|
private long ca = SystemUtils.getMonotonicMillis();
|
2018-12-17 05:18:06 +00:00
|
|
|
private Entity spectatedEntity;
|
2017-05-14 18:05:01 +00:00
|
|
|
public boolean worldChangeInvuln;
|
2020-08-25 02:22:08 +00:00
|
|
|
- private boolean cd;
|
|
|
|
+ private boolean cd; private void setHasSeenCredits(boolean has) { this.cd = has; } // Paper - OBFHELPER
|
2020-06-25 09:27:25 +00:00
|
|
|
private final RecipeBookServer recipeBook = new RecipeBookServer();
|
2020-08-25 02:22:08 +00:00
|
|
|
private Vec3D cf;
|
|
|
|
private int cg;
|
2021-03-16 07:19:45 +00:00
|
|
|
@@ -895,6 +895,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2020-08-25 02:22:08 +00:00
|
|
|
this.decouple();
|
2019-04-24 02:34:11 +00:00
|
|
|
this.getWorldServer().removePlayer(this);
|
2016-03-16 07:21:39 +00:00
|
|
|
if (!this.viewingCredits) {
|
2017-05-14 18:05:01 +00:00
|
|
|
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
2020-08-25 02:22:08 +00:00
|
|
|
this.viewingCredits = true;
|
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.e, this.cd ? 0.0F : 1.0F));
|
|
|
|
this.cd = true;
|