geforkt von Mirrors/Paper
36 Zeilen
2.1 KiB
Diff
36 Zeilen
2.1 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 9bb6b6c6ac26790eaf5f8efe55f8db7407fc0065..1753a28e0dc001d55385cdf0d91edde23244d17b 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -819,6 +819,11 @@ 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);
|
|
+ }
|
|
+
|
|
public boolean phantomIgnoreCreative = true;
|
|
public boolean phantomOnlyAttackInsomniacs = true;
|
|
private void phantomSettings() {
|
|
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 9c5224bd63c63728e86555769702da2f9d0dbbce..452b4cddd2afa4875c760f479c22b017ab05d05e 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
|
|
@@ -368,7 +368,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());
|
|
}
|
|
|