mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
062733b903
Doesn't compile yet. CraftBukkit Changes: 90d6905b Repackage NMS 69cf961d Repackage patches Spigot Changes: 79d53c28 Repackage NMS
36 lines
2 KiB
Diff
36 lines
2 KiB
Diff
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
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
|
log("Using vanilla redstone algorithm.");
|
|
}
|
|
}
|
|
+
|
|
+ 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.");
|
|
+ }
|
|
+ }
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EnderDragonBattle.java b/src/main/java/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
|
--- a/src/main/java/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
|
|
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
|
|
@@ -0,0 +0,0 @@ public class EnderDragonBattle {
|
|
this.dragonUUID = entityenderdragon.getUniqueID();
|
|
EnderDragonBattle.LOGGER.info("Found that there's a dragon still alive ({})", entityenderdragon);
|
|
this.dragonKilled = false;
|
|
- if (!flag) {
|
|
+ if (!flag && this.world.paperConfig.shouldRemoveDragon) { // Paper
|
|
EnderDragonBattle.LOGGER.info("But we didn't have a portal, let's remove it.");
|
|
entityenderdragon.die();
|
|
this.dragonUUID = null;
|