mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-23 13:09:31 +08:00
Make dragon egg a configurable option
This commit is contained in:
parent
a379bd9d21
commit
17cd1ede19
@ -48,6 +48,11 @@ packed-barrels
|
||||
* **default**: true
|
||||
* **description:** Use large size barrels (6 rows, aka 54 slots)
|
||||
|
||||
ender-dragon-death-always-places-egg-block
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* **default**: true
|
||||
* **description:** When true all valid ender dragon deaths will place an ender egg block on top of the portal
|
||||
|
||||
logger
|
||||
~~~~~~
|
||||
* show-duplicate-entity-uuid-errors
|
||||
|
@ -1,25 +1,51 @@
|
||||
From 968cd3a8fd81cd49ad89388d64945fc6d300af13 Mon Sep 17 00:00:00 2001
|
||||
From 9efc6b7d1792352c08101e95449d603fb260a3da Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Sat, 1 Jun 2019 01:16:35 -0500
|
||||
Subject: [PATCH] Always place dragon egg when dragon is killed
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/EnderDragonBattle.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
src/main/java/net/minecraft/server/EnderDragonBattle.java | 4 +++-
|
||||
src/main/java/net/pl3x/purpur/PurpurConfig.java | 5 +++++
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
||||
index 6700c8c65..541884aab 100644
|
||||
index 6700c8c65..f0c77eb6c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
||||
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
||||
@@ -356,7 +356,7 @@ public class EnderDragonBattle {
|
||||
@@ -13,6 +13,8 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Predicate;
|
||||
import javax.annotation.Nullable;
|
||||
+
|
||||
+import net.pl3x.purpur.PurpurConfig;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -356,7 +358,7 @@ public class EnderDragonBattle {
|
||||
this.bossBattle.setVisible(false);
|
||||
this.a(true);
|
||||
this.n();
|
||||
- if (!this.l) {
|
||||
+ if (true || !this.l) { // Purpur - always place dragon egg
|
||||
+ if (PurpurConfig.enderDragonDeathAlwaysPlacesEggBlock || !this.l) { // Purpur - always place dragon egg
|
||||
this.d.setTypeUpdate(this.d.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, WorldGenEndTrophy.a), Blocks.DRAGON_EGG.getBlockData());
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
index 6889dcdde..1c1a63144 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java
|
||||
@@ -141,6 +141,11 @@ public class PurpurConfig {
|
||||
packedBarrels = getBoolean("settings.packed-barrels", packedBarrels);
|
||||
}
|
||||
|
||||
+ public static boolean enderDragonDeathAlwaysPlacesEggBlock = true;
|
||||
+ private static void enderDragonDeathAlwaysPlacesEggBlock() {
|
||||
+ enderDragonDeathAlwaysPlacesEggBlock = getBoolean("ender-dragon-death-always-places-egg-block", enderDragonDeathAlwaysPlacesEggBlock);
|
||||
+ }
|
||||
+
|
||||
public static boolean ridableBat = true;
|
||||
public static boolean ridableBlaze = true;
|
||||
public static boolean ridableCat = true;
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user