2019-10-27 00:55:58 +02:00
|
|
|
From 0f0308d28c55c73c25e8a82d198dc1ae26b86652 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
|
2019-10-27 00:55:58 +02:00
|
|
|
index 4077f4c28..29cd51f6b 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
|
2019-10-27 00:55:58 +02:00
|
|
|
@@ -144,4 +144,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
|
2019-10-27 00:55:58 +02:00
|
|
|
index 94021e9b6..eecdade96 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-05-06 04:58:04 +02:00
|
|
|
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2019-04-24 04:34:11 +02:00
|
|
|
private long cm = SystemUtils.getMonotonicMillis();
|
2018-12-17 06:18:06 +01:00
|
|
|
private Entity spectatedEntity;
|
2017-05-14 20:05:01 +02:00
|
|
|
public boolean worldChangeInvuln;
|
2019-04-24 04:34:11 +02:00
|
|
|
- private boolean cp;
|
|
|
|
+ private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
|
2018-12-17 06:18:06 +01:00
|
|
|
private final RecipeBookServer recipeBook;
|
2019-04-24 04:34:11 +02:00
|
|
|
private Vec3D cr;
|
|
|
|
private int cs;
|
2019-07-23 21:17:32 +02:00
|
|
|
@@ -706,6 +706,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2019-04-24 04:34:11 +02:00
|
|
|
this.getWorldServer().removePlayer(this);
|
2016-03-16 08:21:39 +01:00
|
|
|
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
|
2019-04-24 04:34:11 +02:00
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cp ? 0.0F : 1.0F));
|
|
|
|
this.cp = true;
|
2017-05-14 20:05:01 +02:00
|
|
|
}
|
2016-03-16 08:21:39 +01:00
|
|
|
--
|
2019-10-27 00:55:58 +02:00
|
|
|
2.23.0
|
2016-03-16 08:21:39 +01:00
|
|
|
|