Files
Purpur/patches/server/0054-Ender-dragon-always-drop-egg.patch
William Blake Galbreath 5c7cdad371 Updated Upstream (Paper & Tuinity)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
fcbeac8a [CI-SKIP] Readme update (#3702)
824f8086 Bandaid italic legacy serialization #3757 (#3760)

Tuinity Changes:
9f21359: Re-add optimise collision checking in player move packet handling
1152054: Revert player move packet optimisation
ef0a6c4: Optimise collision checking in player move packets
2020-07-02 20:38:04 -05:00

36 lines
1.8 KiB
Diff

From 0000000000000000000000000000000000000000 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
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 a6b048873..62b94bff3 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -135,6 +135,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);