-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure reset EnderDragon boss event name (#8562)
- Loading branch information
1 parent
5f4952f
commit 564356d
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
patches/server/0937-ensure-reset-EnderDragon-boss-event-name.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Jake Potrebic <jake.m.potrebic@gmail.com> | ||
Date: Sat, 12 Nov 2022 10:08:58 -0800 | ||
Subject: [PATCH] ensure reset EnderDragon boss event name | ||
|
||
Fix MC-257487 | ||
|
||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java | ||
index c36a543f091447ad50beb71741de3301e4fb81e3..a9052dd27005d244a96511fc5dbfa92f20a21f46 100644 | ||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java | ||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java | ||
@@ -67,7 +67,8 @@ public class EndDragonFight { | ||
private static final int GATEWAY_DISTANCE = 96; | ||
public static final int DRAGON_SPAWN_Y = 128; | ||
private static final Predicate<Entity> VALID_PLAYER = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance(0.0D, 128.0D, 0.0D, 192.0D)); | ||
- public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(Component.translatable("entity.minecraft.ender_dragon"), BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); | ||
+ private static final Component DEFAULT_BOSS_EVENT_NAME = Component.translatable("entity.minecraft.ender_dragon"); // Paper | ||
+ public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(DEFAULT_BOSS_EVENT_NAME, BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); // Paper | ||
public final ServerLevel level; | ||
private final ObjectArrayList<Integer> gateways = new ObjectArrayList<>(); | ||
private final BlockPattern exitPortalPattern; | ||
@@ -440,6 +441,10 @@ public class EndDragonFight { | ||
this.ticksSinceDragonSeen = 0; | ||
if (dragon.hasCustomName()) { | ||
this.dragonEvent.setName(dragon.getDisplayName()); | ||
+ // Paper start - reset to default name | ||
+ } else { | ||
+ this.dragonEvent.setName(DEFAULT_BOSS_EVENT_NAME); | ||
+ // Paper end | ||
} | ||
} | ||
|