Fix disableEndCredits world config (#11261)

This commit is contained in:
Lulu13022002 2024-08-14 21:26:38 +02:00
parent fe4996a080
commit 815149208d

View file

@ -4,15 +4,15 @@ Date: Wed, 16 Mar 2016 02:21:39 -0500
Subject: [PATCH] Configurable end credits 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 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java
@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { @@ -0,0 +0,0 @@ public class EndPortalBlock extends BaseEntityBlock implements Portal {
this.unRide(); if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) {
this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); ServerPlayer entityplayer = (ServerPlayer) entity;
if (!this.wonGame) {
+ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Option to disable end credits + if (world.paperConfig().misc.disableEndCredits) entityplayer.seenCredits = true; // Paper - Option to disable end credits
this.wonGame = true; if (!entityplayer.seenCredits) {
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, 0.0F)); entityplayer.showEndCredits();
this.seenCredits = true; return;