Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
36 Zeilen
1.9 KiB
Diff
36 Zeilen
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
Date: Fri, 22 Jun 2018 10:38:31 -0500
|
|
Subject: [PATCH] Add config to disable ender dragon legacy check
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index 4fe89087fb7f5132ea7e4fec5fbc2885644f369e..3a9f0d5937b9d9abd4e4941c1a3f35f202b0d84a 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -404,4 +404,9 @@ public class PaperWorldConfig {
|
|
private void shieldBlockingDelay() {
|
|
shieldBlockingDelay = getInt("game-mechanics.shield-blocking-delay", 5);
|
|
}
|
|
+
|
|
+ public boolean scanForLegacyEnderDragon = true;
|
|
+ private void scanForLegacyEnderDragon() {
|
|
+ scanForLegacyEnderDragon = getBoolean("game-mechanics.scan-for-legacy-ender-dragon", true);
|
|
+ }
|
|
}
|
|
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 2b7ffbc125d01db093a31ed6147fc1d736a01e80..9a6b2c75b8622b0f9eda85011ef6f2f1dca574c9 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
|
|
@@ -88,6 +88,10 @@ public class EndDragonFight {
|
|
private List<EndCrystal> respawnCrystals;
|
|
|
|
public EndDragonFight(ServerLevel world, long gatewaysSeed, CompoundTag nbt) {
|
|
+ // Paper start
|
|
+ this.needsStateScanning = world.paperConfig.scanForLegacyEnderDragon;
|
|
+ if (!this.needsStateScanning) this.dragonKilled = true;
|
|
+ // Paper end
|
|
this.level = world;
|
|
if (nbt.contains("NeedsStateScanning")) {
|
|
this.needsStateScanning = nbt.getBoolean("NeedsStateScanning");
|