Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
46 Zeilen
2.1 KiB
Diff
46 Zeilen
2.1 KiB
Diff
From 0d4cacaffc984e789135355f9b2f7eac2983f7af Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 94a17304..db09711e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -141,4 +141,10 @@ public class PaperWorldConfig {
|
|
queueLightUpdates = getBoolean("queue-light-updates", false);
|
|
log("Lighting Queue enabled: " + queueLightUpdates);
|
|
}
|
|
+
|
|
+ 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
|
|
index 4e71963b..9829cdd8 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -56,7 +56,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
private long cn = System.currentTimeMillis();
|
|
private Entity co;
|
|
public boolean worldChangeInvuln;
|
|
- private boolean cq;
|
|
+ private boolean cq; private void setHasSeenCredits(boolean has) { this.cq = has; } // Paper - OBFHELPER
|
|
private final RecipeBookServer cr = new RecipeBookServer();
|
|
private Vec3D cs;
|
|
private int ct;
|
|
@@ -603,6 +603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
this.world.kill(this);
|
|
if (!this.viewingCredits) {
|
|
this.viewingCredits = true;
|
|
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
|
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cq ? 0.0F : 1.0F));
|
|
this.cq = true;
|
|
}
|
|
--
|
|
2.14.3
|
|
|