2018-07-04 09:55:24 +02:00
|
|
|
From 2a957c68f83983541fb26d90e11944e9f97ec7fa 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
|
2018-03-08 20:36:35 +01:00
|
|
|
index 94a173045..db09711e4 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
|
2018-01-11 06:31:19 +01:00
|
|
|
@@ -141,4 +141,10 @@ public class PaperWorldConfig {
|
2016-03-25 07:38:38 +01:00
|
|
|
queueLightUpdates = getBoolean("queue-light-updates", false);
|
|
|
|
log("Lighting Queue enabled: " + queueLightUpdates);
|
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
|
2018-03-08 20:36:35 +01:00
|
|
|
index 730acd971..dfaab774d 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
|
2017-05-31 10:04:52 +02:00
|
|
|
@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2017-05-21 06:41:39 +02:00
|
|
|
private long cn = System.currentTimeMillis();
|
|
|
|
private Entity co;
|
2017-05-14 20:05:01 +02:00
|
|
|
public boolean worldChangeInvuln;
|
2017-05-21 06:41:39 +02:00
|
|
|
- private boolean cq;
|
|
|
|
+ private boolean cq; private void setHasSeenCredits(boolean has) { this.cq = has; } // Paper - OBFHELPER
|
|
|
|
private final RecipeBookServer cr = new RecipeBookServer();
|
|
|
|
private Vec3D cs;
|
|
|
|
private int ct;
|
2018-03-08 20:36:35 +01:00
|
|
|
@@ -612,6 +612,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2016-03-16 08:21:39 +01:00
|
|
|
this.world.kill(this);
|
|
|
|
if (!this.viewingCredits) {
|
|
|
|
this.viewingCredits = true;
|
2017-05-14 20:05:01 +02:00
|
|
|
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
2017-05-21 06:41:39 +02:00
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cq ? 0.0F : 1.0F));
|
|
|
|
this.cq = true;
|
2017-05-14 20:05:01 +02:00
|
|
|
}
|
2016-03-16 08:21:39 +01:00
|
|
|
--
|
2018-07-04 09:55:24 +02:00
|
|
|
2.18.0
|
2016-03-16 08:21:39 +01:00
|
|
|
|