mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 17:37:42 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: df0d7b0d Update upstream CB 6ea3c2cf [CI-SKIP] Rebuild patches d7bed4cb Heavily optimise random block ticking (#2914) b66d9ff8 Update upstream CB ba71c5d6 Stop stripping private use block Unicode from signs 28d9dcfc Entity Jump API (#1587) 9976a768 Fix PlayerNaturallySpawnCreaturesEvent boolean inversion 054e20da Clean up imports on ThrownEggHatchEvent a8984ccb Add ThrownEggHatchEvent (#1982) 9f24d495 Allow nerfed blazes, endermen to take water damage (#2847)
62 lines
3.0 KiB
Diff
62 lines
3.0 KiB
Diff
From 10df2782f37524de4bbbc19fa205049fe4476a9a 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 | 5 +++--
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 2 ++
|
|
2 files changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
|
index 218c04245..48398aa9f 100644
|
|
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
|
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
|
@@ -21,7 +21,7 @@ public class EnderDragonBattle {
|
|
private static final Logger LOGGER = LogManager.getLogger();
|
|
private static final Predicate<Entity> b = IEntitySelector.a.and(IEntitySelector.a(0.0D, 128.0D, 0.0D, 192.0D));
|
|
public final BossBattleServer bossBattle;
|
|
- private final WorldServer d;
|
|
+ private final WorldServer d; public WorldServer getWorld() { return d; } // Purpur - OBFHELPER
|
|
private final List<Integer> e;
|
|
private final ShapeDetector f;
|
|
private int g;
|
|
@@ -358,7 +358,7 @@ public class EnderDragonBattle {
|
|
this.bossBattle.setVisible(false);
|
|
this.a(true);
|
|
this.n();
|
|
- if (!this.l) {
|
|
+ if (getWorld().purpurConfig.enderDragonAlwaysDropsEggBlock || !wasPreviouslyKilled()) { // Purpur - always place dragon egg
|
|
this.d.setTypeUpdate(this.d.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, WorldGenEndTrophy.a), Blocks.DRAGON_EGG.getBlockData());
|
|
}
|
|
|
|
@@ -439,6 +439,7 @@ public class EnderDragonBattle {
|
|
|
|
}
|
|
|
|
+ public boolean wasPreviouslyKilled() { return d(); } // Purpur - OBFHELPER;
|
|
public boolean d() {
|
|
return this.l;
|
|
}
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 501544b67..b763c1144 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -193,11 +193,13 @@ public class PurpurWorldConfig {
|
|
public boolean enderDragonRidableInWater = false;
|
|
public boolean enderDragonRequireShiftToMount = true;
|
|
public double enderDragonMaxY = 256D;
|
|
+ public boolean enderDragonAlwaysDropsEggBlock = false;
|
|
private void enderDragonSettings() {
|
|
enderDragonRidable = getBoolean("mobs.ender_dragon.ridable", enderDragonRidable);
|
|
enderDragonRidableInWater = getBoolean("mobs.ender_dragon.ridable-in-water", enderDragonRidableInWater);
|
|
enderDragonRequireShiftToMount = getBoolean("mobs.ender_dragon.require-shift-to-mount", enderDragonRequireShiftToMount);
|
|
enderDragonMaxY = getDouble("mobs.ender_dragon.ridable-max-y", enderDragonMaxY);
|
|
+ enderDragonAlwaysDropsEggBlock = getBoolean("mobs.ender_dragon.always-drop-egg-block", enderDragonAlwaysDropsEggBlock);
|
|
}
|
|
|
|
public boolean endermanRidable = false;
|
|
--
|
|
2.24.0
|
|
|