From 815149208dc0a80526d8ce26048b9462c187c183 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Wed, 14 Aug 2024 21:26:38 +0200 Subject: [PATCH] Fix disableEndCredits world config (#11261) --- patches/server/Configurable-end-credits.patch | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/patches/server/Configurable-end-credits.patch b/patches/server/Configurable-end-credits.patch index df984bbba2..3469ebf0bf 100644 --- a/patches/server/Configurable-end-credits.patch +++ b/patches/server/Configurable-end-credits.patch @@ -4,15 +4,15 @@ Date: Wed, 16 Mar 2016 02:21:39 -0500 Subject: [PATCH] Configurable end credits -diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java +diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java -+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { - this.unRide(); - this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); - if (!this.wonGame) { -+ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Option to disable end credits - this.wonGame = true; - this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, 0.0F)); - this.seenCredits = true; +--- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +@@ -0,0 +0,0 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal { + if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) { + ServerPlayer entityplayer = (ServerPlayer) entity; + ++ if (world.paperConfig().misc.disableEndCredits) entityplayer.seenCredits = true; // Paper - Option to disable end credits + if (!entityplayer.seenCredits) { + entityplayer.showEndCredits(); + return;