Move to configurate for paper.yml (#7609)
This commit is contained in:
@@ -5,20 +5,6 @@ Subject: [PATCH] Fix invulnerable end crystals
|
||||
|
||||
MC-108513
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
private void fixItemsMergingThroughWalls() {
|
||||
fixItemsMergingThroughWalls = getBoolean("fix-items-merging-through-walls", fixItemsMergingThroughWalls);
|
||||
}
|
||||
+
|
||||
+ public boolean fixInvulnerableEndCrystalExploit = true;
|
||||
+ private void fixInvulnerableEndCrystalExploit() {
|
||||
+ fixInvulnerableEndCrystalExploit = getBoolean("unsupported-settings.fix-invulnerable-end-crystal-exploit", fixInvulnerableEndCrystalExploit);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
|
||||
@@ -36,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
// CraftBukkit end
|
||||
}
|
||||
+ // Paper start - Fix invulnerable end crystals
|
||||
+ if (this.level.paperConfig.fixInvulnerableEndCrystalExploit && this.generatedByDragonFight && this.isInvulnerable()) {
|
||||
+ if (this.level.paperConfig().unsupportedSettings.fixInvulnerableEndCrystalExploit && this.generatedByDragonFight && this.isInvulnerable()) {
|
||||
+ if (!java.util.Objects.equals(((ServerLevel) this.level).uuid, this.getOriginWorld())
|
||||
+ || ((ServerLevel) this.level).dragonFight() == null
|
||||
+ || ((ServerLevel) this.level).dragonFight().respawnStage == null
|
||||
|
||||
Reference in New Issue
Block a user