2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Mariell Hoversholm <proximyst@proximyst.com>
|
|
|
|
Date: Wed, 30 Sep 2020 22:49:14 +0200
|
|
|
|
Subject: [PATCH] Toggle for removing existing dragon
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-08-26 04:16:27 +02:00
|
|
|
index f35bf9e1515d55143a1604e0aa7ec0b810a1a4c5..b7bfeb493008cd7a190fbce84b6162b0fd8b2cb3 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-06-15 15:20:52 +02:00
|
|
|
@@ -53,6 +53,14 @@ public class PaperWorldConfig {
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
}
|
2021-06-14 18:58:00 +02:00
|
|
|
|
2021-06-11 14:02:28 +02:00
|
|
|
+ public boolean shouldRemoveDragon = false;
|
|
|
|
+ private void shouldRemoveDragon() {
|
|
|
|
+ shouldRemoveDragon = getBoolean("should-remove-dragon", shouldRemoveDragon);
|
|
|
|
+ if (shouldRemoveDragon) {
|
|
|
|
+ log("The Ender Dragon will be removed if she already exists without a portal.");
|
|
|
|
+ }
|
|
|
|
+ }
|
2021-06-14 18:58:00 +02:00
|
|
|
+
|
|
|
|
public short keepLoadedRange;
|
|
|
|
private void keepLoadedRange() {
|
|
|
|
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
2021-06-11 14:02:28 +02:00
|
|
|
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
|
2021-06-14 18:58:00 +02:00
|
|
|
index 9899c70b88fc371963e33caccd7125ef8c333df4..e1d689aa65b8d993c7223d306363366f3adff62f 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
2021-06-14 18:58:00 +02:00
|
|
|
@@ -212,7 +212,7 @@ public class EndDragonFight {
|
|
|
|
this.dragonUUID = enderDragon.getUUID();
|
|
|
|
LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon);
|
2021-06-11 14:02:28 +02:00
|
|
|
this.dragonKilled = false;
|
2021-06-14 18:58:00 +02:00
|
|
|
- if (!bl) {
|
|
|
|
+ if (!bl && this.level.paperConfig.shouldRemoveDragon) {
|
|
|
|
LOGGER.info("But we didn't have a portal, let's remove it.");
|
|
|
|
enderDragon.discard();
|
2021-06-11 14:02:28 +02:00
|
|
|
this.dragonUUID = null;
|