geforkt von Mirrors/Paper
a923e332ee
Also adds per-world spawn limit config in paper.yml for `underground_water_creature`, and migrates existing spawn limit config options to their Mojang names.
35 Zeilen
2.0 KiB
Diff
35 Zeilen
2.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Thu, 26 Nov 2020 11:47:24 +0000
|
|
Subject: [PATCH] Add toggle for always placing the dragon egg
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
index cdaf146c11239858391cd899758c3d8f91b8806c..e996b5a8559d731accb6f09eb46437c33b088d3e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -799,5 +799,10 @@ public class PaperWorldConfig {
|
|
}
|
|
perPlayerMobSpawns = getBoolean("per-player-mob-spawns", true);
|
|
}
|
|
+
|
|
+ public boolean enderDragonsDeathAlwaysPlacesDragonEgg = false;
|
|
+ private void enderDragonsDeathAlwaysPlacesDragonEgg() {
|
|
+ enderDragonsDeathAlwaysPlacesDragonEgg = getBoolean("ender-dragons-death-always-places-dragon-egg", enderDragonsDeathAlwaysPlacesDragonEgg);
|
|
+ }
|
|
}
|
|
|
|
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 e1d689aa65b8d993c7223d306363366f3adff62f..f88719dede80c064f6210e078c435ffda32ecc1a 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
|
|
@@ -363,7 +363,7 @@ public class EndDragonFight {
|
|
this.dragonEvent.setVisible(false);
|
|
this.spawnExitPortal(true);
|
|
this.spawnNewGateway();
|
|
- if (!this.previouslyKilled) {
|
|
+ if (this.level.paperConfig.enderDragonsDeathAlwaysPlacesDragonEgg || !this.previouslyKilled) { // Paper - always place dragon egg
|
|
this.level.setBlockAndUpdate(this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.END_PODIUM_LOCATION), Blocks.DRAGON_EGG.defaultBlockState());
|
|
}
|
|
|