2020-05-06 09:48:49 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2016-03-16 07:21:39 +00: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
|
2020-05-06 09:48:49 +00:00
|
|
|
index f7a0a33e49cadf9b2bd43f118c106937760da762..50dec5cb5e924301842300e8fc80cb671b6b9173 100644
|
2016-03-16 07:21:39 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2019-10-26 22:55:58 +00:00
|
|
|
@@ -144,4 +144,10 @@ public class PaperWorldConfig {
|
2019-04-24 02:34:11 +00:00
|
|
|
}
|
|
|
|
}
|
2016-03-16 07:21:39 +00: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
|
2020-05-06 09:48:49 +00:00
|
|
|
index 26e32aa1dbd6de0ba971c32f8daef0d92d65b683..cd09b207c963d81c9302067e0294db57e3ffd0f7 100644
|
2016-03-16 07:21:39 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
2019-05-06 02:58:04 +00:00
|
|
|
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2019-12-11 00:56:03 +00:00
|
|
|
private long cj = SystemUtils.getMonotonicMillis();
|
2018-12-17 05:18:06 +00:00
|
|
|
private Entity spectatedEntity;
|
2017-05-14 18:05:01 +00:00
|
|
|
public boolean worldChangeInvuln;
|
2019-12-11 00:56:03 +00:00
|
|
|
- private boolean cm;
|
|
|
|
+ private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
2018-12-17 05:18:06 +00:00
|
|
|
private final RecipeBookServer recipeBook;
|
2019-12-11 00:56:03 +00:00
|
|
|
private Vec3D co;
|
|
|
|
private int cp;
|
2020-01-28 00:16:53 +00:00
|
|
|
@@ -695,6 +695,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
2019-04-24 02:34:11 +00:00
|
|
|
this.getWorldServer().removePlayer(this);
|
2016-03-16 07:21:39 +00:00
|
|
|
if (!this.viewingCredits) {
|
|
|
|
this.viewingCredits = true;
|
2017-05-14 18:05:01 +00:00
|
|
|
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
2019-12-11 00:56:03 +00:00
|
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cm ? 0.0F : 1.0F));
|
|
|
|
this.cm = true;
|
2017-05-14 18:05:01 +00:00
|
|
|
}
|