2017-05-14 20:05:01 +02:00
|
|
|
From 3044d2ae539fbe4d31af51351181e00ac6aed4ba 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
|
2017-03-25 04:18:58 +01:00
|
|
|
index fd606ee14..c00fa83d5 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
|
2017-03-25 04:18:58 +01:00
|
|
|
@@ -149,4 +149,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
|
2017-05-14 20:05:01 +02:00
|
|
|
index 3ef2ffd2d..586c4ad0d 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-14 20:05:01 +02:00
|
|
|
@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
|
|
private long co = System.currentTimeMillis();
|
|
|
|
private Entity cp;
|
|
|
|
public boolean worldChangeInvuln;
|
|
|
|
- private boolean cr;
|
|
|
|
+ private boolean cr; private void setHasSeenCredits(boolean has) { this.cr = has; } // Paper - OBFHELPER
|
|
|
|
private final RecipeBookServer cs = new RecipeBookServer();
|
|
|
|
private Vec3D ct;
|
|
|
|
private int cu;
|
|
|
|
@@ -603,6 +603,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
|
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cr ? 0.0F : 1.0F));
|
|
|
|
this.cr = true;
|
|
|
|
}
|
2016-03-16 08:21:39 +01:00
|
|
|
--
|
2017-05-14 20:05:01 +02:00
|
|
|
2.13.0
|
2016-03-16 08:21:39 +01:00
|
|
|
|