Move to configurate for paper.yml (#7609)
This commit is contained in:
@@ -4,22 +4,6 @@ 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 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 {
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -29,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.spawnExitPortal(true);
|
||||
this.spawnNewGateway();
|
||||
- if (!this.previouslyKilled) {
|
||||
+ if (this.level.paperConfig.enderDragonsDeathAlwaysPlacesDragonEgg || !this.previouslyKilled) { // Paper - always place dragon egg
|
||||
+ if (this.level.paperConfig().entities.behavior.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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user