mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
ensure reset EnderDragon boss event name (#8562)
This commit is contained in:
parent
af85b6071c
commit
1221fdbc95
1 changed files with 32 additions and 0 deletions
|
@ -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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
|
||||
@@ -0,0 +0,0 @@ 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;
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue