-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable crystal-portal proximity check
- Loading branch information
1 parent
a872cd0
commit 0266a3a
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
patches/server/0129-Disable-crystal-portal-proximity-check.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Bluemangoo <[email protected]> | ||
Date: Fri, 19 Jul 2024 15:04:03 +0800 | ||
Subject: [PATCH] Disable crystal-portal proximity check | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java | ||
index 5f51e64cb0611a4ba6bdcdcacbcba1063a7f3a5c..29c9543a1afa03b2d2864d366d526029c0f4f0d4 100644 | ||
--- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java | ||
+++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java | ||
@@ -30,7 +30,7 @@ public class EndCrystalItem extends Item { | ||
if (!iblockdata.is(Blocks.OBSIDIAN) && !iblockdata.is(Blocks.BEDROCK)) { | ||
return InteractionResult.FAIL; | ||
} else { | ||
- BlockPos blockposition1 = blockposition.above(); final BlockPos aboveBlockPosition = blockposition1; // Paper - OBFHELPER | ||
+ BlockPos blockposition1 = blockposition.above(); // final BlockPos aboveBlockPosition = blockposition1; // Paper - OBFHELPER // Leaves | ||
|
||
if (!world.isEmptyBlock(blockposition1)) { | ||
return InteractionResult.FAIL; | ||
@@ -58,7 +58,8 @@ public class EndCrystalItem extends Item { | ||
EndDragonFight enderdragonbattle = ((ServerLevel) world).getDragonFight(); | ||
|
||
if (enderdragonbattle != null) { | ||
- enderdragonbattle.tryRespawn(aboveBlockPosition); // Paper - Perf: Do crystal-portal proximity check before entity lookup | ||
+ // enderdragonbattle.tryRespawn(aboveBlockPosition); // Paper - Perf: Do crystal-portal proximity check before entity lookup | ||
+ enderdragonbattle.tryRespawn(); // Leaves | ||
} | ||
} | ||
|
||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java | ||
index 478cba8137d153fe922ca7f402d306d8c12bcb31..cf76806da53ad2e34074744e97f081b37be65a10 100644 | ||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java | ||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java | ||
@@ -617,12 +617,14 @@ public class EndDragonFight { | ||
} | ||
|
||
public boolean tryRespawn() { // CraftBukkit - return boolean | ||
+ /* Leaves | ||
// Paper start - Perf: Do crystal-portal proximity check before entity lookup | ||
return this.tryRespawn(null); | ||
} | ||
|
||
public boolean tryRespawn(@Nullable BlockPos placedEndCrystalPos) { // placedEndCrystalPos is null if the tryRespawn() call was not caused by a placed end crystal | ||
// Paper end - Perf: Do crystal-portal proximity check before entity lookup | ||
+ */ | ||
if (this.dragonKilled && this.respawnStage == null) { | ||
BlockPos blockposition = this.portalLocation; | ||
|
||
@@ -640,6 +642,7 @@ public class EndDragonFight { | ||
blockposition = this.portalLocation; | ||
} | ||
|
||
+ /* Leaves | ||
// Paper start - Perf: Do crystal-portal proximity check before entity lookup | ||
if (placedEndCrystalPos != null) { | ||
// The end crystal must be 0 or 1 higher than the portal origin | ||
@@ -655,6 +658,7 @@ public class EndDragonFight { | ||
} | ||
} | ||
// Paper end - Perf: Do crystal-portal proximity check before entity lookup | ||
+ */ | ||
|
||
List<EndCrystal> list = Lists.newArrayList(); | ||
BlockPos blockposition1 = blockposition.above(1); |