2020-05-06 11:48:49 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2016-03-16 08:21:39 +01: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 05:58:42 +01:00
|
|
|
index a005c4398336dba3b5e3ef716f44f2eda7306442..88f5a415770da5dfcf7af95045f547e0761adc8b 100644
|
2016-03-16 08:21:39 +01:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2020-11-12 05:58:42 +01:00
|
|
|
@@ -145,4 +145,10 @@ public class PaperWorldConfig {
|
2019-04-24 04:34:11 +02:00
|
|
|
}
|
|
|
|
}
|
2016-03-16 08:21:39 +01: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/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2020-11-18 04:45:18 +01:00
|
|
|
index 74f5cdd4a73d33f593de86eaa0361c35e54e690d..e1bb73282990b685a9d767b3aa9ea16791c15e9a 100644
|
2016-03-16 08:21:39 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2020-08-25 04:22:08 +02:00
|
|
|
@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
private long ca = SystemUtils.getMonotonicMillis();
|
2018-12-17 06:18:06 +01:00
|
|
|
private Entity spectatedEntity;
|
2017-05-14 20:05:01 +02:00
|
|
|
public boolean worldChangeInvuln;
|
2020-08-25 04:22:08 +02:00
|
|
|
- private boolean cd;
|
|
|
|
+ private boolean cd; private void setHasSeenCredits(boolean has) { this.cd = has; } // Paper - OBFHELPER
|
2020-06-25 11:27:25 +02:00
|
|
|
private final RecipeBookServer recipeBook = new RecipeBookServer();
|
2020-08-25 04:22:08 +02:00
|
|
|
private Vec3D cf;
|
|
|
|
private int cg;
|
2020-11-03 03:22:15 +01:00
|
|
|
@@ -770,6 +770,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2020-08-25 04:22:08 +02:00
|
|
|
this.decouple();
|
2019-04-24 04:34:11 +02:00
|
|
|
this.getWorldServer().removePlayer(this);
|
2016-03-16 08:21:39 +01:00
|
|
|
if (!this.viewingCredits) {
|
2017-05-14 20:05:01 +02:00
|
|
|
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
2020-08-25 04:22:08 +02:00
|
|
|
this.viewingCredits = true;
|
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.e, this.cd ? 0.0F : 1.0F));
|
|
|
|
this.cd = true;
|