2018-07-15 03:53:17 +02:00
|
|
|
From 5b727c50fb330b282c3b6b23576ca0f5e552e2a5 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-07-15 03:53:17 +02:00
|
|
|
index 1e3405cc1..dccccbf5b 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-07-15 03:53:17 +02:00
|
|
|
@@ -135,4 +135,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-07-15 03:53:17 +02:00
|
|
|
index e035025f0..cb44bf3a7 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
|
2018-07-15 03:53:17 +02:00
|
|
|
@@ -62,7 +62,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
private long cv = SystemUtils.b();
|
|
|
|
private Entity cw;
|
2017-05-14 20:05:01 +02:00
|
|
|
public boolean worldChangeInvuln;
|
2018-07-15 03:53:17 +02:00
|
|
|
- private boolean cy;
|
|
|
|
+ private boolean cy; private void setHasSeenCredits(boolean has) { this.cy = has; } // Paper - OBFHELPER
|
|
|
|
private final RecipeBookServer cz;
|
|
|
|
private Vec3D cA;
|
|
|
|
private int cB;
|
|
|
|
@@ -621,6 +621,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
|
2018-07-15 03:53:17 +02:00
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cy ? 0.0F : 1.0F));
|
|
|
|
this.cy = 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
|
|
|
|