Paper/Spigot-Server-Patches/0029-Configurable-end-credits.patch
Shane Freeder 3496f2d7e4
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses

CraftBukkit Changes:
38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN
b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks
6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses
c64fe508 Mappings Update
a3c2ec03 Fix missing ServerListPingEvent call for legacy pings

Spigot Changes:
1dc156ce Rebuild patches
140f654d Mappings Update
2018-12-17 05:19:39 +00:00

46 lines
2.2 KiB
Diff

From 218a1980882ca92ea3578f3ad4d3a34804dbda7e 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 8f6f0288b..5aee23dce 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -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.");
}
+
+ 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 d0d93b1eb..2804bfc0a 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -61,7 +61,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
private long cu = SystemUtils.getMonotonicMillis();
private Entity spectatedEntity;
public boolean worldChangeInvuln;
- private boolean cx;
+ private boolean cx; private void setHasSeenCredits(boolean has) { this.cx = has; } // Paper - OBFHELPER
private final RecipeBookServer recipeBook;
private Vec3D cz;
private int cA;
@@ -649,6 +649,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.cx ? 0.0F : 1.0F));
this.cx = true;
}
--
2.20.0