2019-01-01 04:15:55 +01:00
|
|
|
From 8389f574485f07e27a681ea473b5028947250219 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-12-17 06:18:06 +01:00
|
|
|
index 8f6f0288b..5aee23dce 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-09-26 06:57:59 +02:00
|
|
|
@@ -138,4 +138,10 @@ public class PaperWorldConfig {
|
|
|
|
log("Warning: This feature may help reduce TPS loss from light, but comes at the cost of buggy light data");
|
|
|
|
log("We are working to improve this feature.");
|
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
|
2019-01-01 04:15:55 +01:00
|
|
|
index 5e60bdb40..301119d3e 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
|
2019-01-01 04:15:55 +01:00
|
|
|
@@ -58,7 +58,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2018-12-17 06:18:06 +01:00
|
|
|
private long cu = SystemUtils.getMonotonicMillis();
|
|
|
|
private Entity spectatedEntity;
|
2017-05-14 20:05:01 +02:00
|
|
|
public boolean worldChangeInvuln;
|
2018-08-26 20:11:49 +02:00
|
|
|
- private boolean cx;
|
|
|
|
+ private boolean cx; private void setHasSeenCredits(boolean has) { this.cx = has; } // Paper - OBFHELPER
|
2018-12-17 06:18:06 +01:00
|
|
|
private final RecipeBookServer recipeBook;
|
2018-08-26 20:11:49 +02:00
|
|
|
private Vec3D cz;
|
|
|
|
private int cA;
|
2019-01-01 04:15:55 +01:00
|
|
|
@@ -651,6 +651,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-08-26 20:11:49 +02:00
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cx ? 0.0F : 1.0F));
|
|
|
|
this.cx = true;
|
2017-05-14 20:05:01 +02:00
|
|
|
}
|
2016-03-16 08:21:39 +01:00
|
|
|
--
|
2019-01-01 04:15:55 +01:00
|
|
|
2.20.1
|
2016-03-16 08:21:39 +01:00
|
|
|
|