Files
Purpur/patches/server/0045-Ender-dragon-always-drop-egg.patch
BillyGalbreath 391f9addfd Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
fb36f15d6 Let some more packets be send immediately, closes #4140 (#4896)
ede41fe16 Emancipate more features to PlayerHandshakeEvent
3fdeba1f5 [CI-SKIP] [Auto] Rebuild Patches
5fc07bd63 Maded Title-Objects directy sendable to targets
e7b9a478e Player Chunk Load/Unload Events
1d0cfc0cc MC-4 Fix item position desync
458db6206 Limit auto recipe packets
2020-12-16 18:05:35 -06:00

36 lines
2.0 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 38dc6086d18951e065d4048d1d8eee288c5c5fd1..f853f6c424da77c40ee3d5b5dc2279ba8918977c 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.generateExitPortal(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 6d93ff4b08582f0f3ea1bb4b582aaa881651d34d..bafead429f2ca19033a63241ff24b16f597f7678 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -142,6 +142,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);