mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 12:11:47 +01:00
d16a5d8813
Prereq changes for the coming storm of performance patches. Includes optimising incremental saving
45 lines
2 KiB
Diff
45 lines
2 KiB
Diff
From c084ec91efac4a1c1d5721f399bd0647a1151d9c 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 f7a0a33e49..50dec5cb5e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -144,4 +144,10 @@ public class PaperWorldConfig {
|
|
}
|
|
}
|
|
}
|
|
+
|
|
+ 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 57ce9bde64..23c1706874 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
|
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
private long cj = SystemUtils.getMonotonicMillis();
|
|
private Entity spectatedEntity;
|
|
public boolean worldChangeInvuln;
|
|
- private boolean cm;
|
|
+ private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
|
private final RecipeBookServer recipeBook;
|
|
private Vec3D co;
|
|
private int cp;
|
|
@@ -695,6 +695,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
|
this.getWorldServer().removePlayer(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.cm ? 0.0F : 1.0F));
|
|
this.cm = true;
|
|
}
|
|
--
|
|
2.25.0.windows.1
|
|
|