Files
Purpur/patches/server/0053-Ender-dragon-always-drop-egg.patch
William Blake Galbreath 1a46c4bc6b Update to 1.16.1
2020-06-28 21:51:07 -05:00

43 lines
2.0 KiB
Diff

From cd0557107ef93a0cebc2242260df1d5a841de62d Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 7 Feb 2020 04:42:57 -0600
Subject: [PATCH] Ender dragon always drop egg
---
src/main/java/net/minecraft/server/EnderDragonBattle.java | 2 +-
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index 69faefbdb..ecd6af04d 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -358,7 +358,7 @@ public class EnderDragonBattle {
this.bossBattle.setVisible(false);
this.a(true);
this.n();
- if (!this.previouslyKilled) {
+ if (this.world.purpurConfig.enderDragonAlwaysDropsEggBlock || !this.previouslyKilled) { // Purpur - always place dragon egg
this.world.setTypeUpdate(this.world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, WorldGenEndTrophy.a), Blocks.DRAGON_EGG.getBlockData());
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index ce443f9d7..c76b15bef 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -125,6 +125,11 @@ public class PurpurWorldConfig {
creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance);
}
+ public boolean enderDragonAlwaysDropsEggBlock = false;
+ private void enderDragonSettings() {
+ enderDragonAlwaysDropsEggBlock = getBoolean("mobs.ender_dragon.always-drop-egg-block", enderDragonAlwaysDropsEggBlock);
+ }
+
public boolean foxTypeChangesWithTulips = false;
private void foxSettings() {
foxTypeChangesWithTulips = getBoolean("mobs.fox.tulips-change-type", foxTypeChangesWithTulips);
--
2.26.2