mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
--------- Co-authored-by: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> Co-authored-by: violetc <58360096+s-yh-china@users.noreply.github.com> Co-authored-by: Helvetica Volubi <88063803+Suisuroru@users.noreply.github.com>
65 lines
3.5 KiB
Diff
65 lines
3.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Bluemangoo <chenfy2006@qq.com>
|
|
Date: Fri, 19 Jul 2024 15:04:03 +0800
|
|
Subject: [PATCH] Disable crystal-portal proximity check
|
|
|
|
|
|
diff --git a/net/minecraft/world/item/EndCrystalItem.java b/net/minecraft/world/item/EndCrystalItem.java
|
|
index 05ec512839898f96d9769bb0d00f6ba11dda0c4b..27b225344c34e561d4913b3a6ca1c4a42d22ef41 100644
|
|
--- a/net/minecraft/world/item/EndCrystalItem.java
|
|
+++ b/net/minecraft/world/item/EndCrystalItem.java
|
|
@@ -27,7 +27,7 @@ public class EndCrystalItem extends Item {
|
|
if (!blockState.is(Blocks.OBSIDIAN) && !blockState.is(Blocks.BEDROCK)) {
|
|
return InteractionResult.FAIL;
|
|
} else {
|
|
- BlockPos blockPos = clickedPos.above(); final BlockPos aboveBlockPos = blockPos; // Paper - OBFHELPER
|
|
+ BlockPos blockPos = clickedPos.above(); // final BlockPos aboveBlockPos = blockPos; // Paper - OBFHELPER // Leaves
|
|
if (!level.isEmptyBlock(blockPos)) {
|
|
return InteractionResult.FAIL;
|
|
} else {
|
|
@@ -51,7 +51,7 @@ public class EndCrystalItem extends Item {
|
|
level.gameEvent(context.getPlayer(), GameEvent.ENTITY_PLACE, blockPos);
|
|
EndDragonFight dragonFight = ((ServerLevel)level).getDragonFight();
|
|
if (dragonFight != null) {
|
|
- dragonFight.tryRespawn(aboveBlockPos); // Paper - Perf: Do crystal-portal proximity check before entity lookup
|
|
+ dragonFight.tryRespawn(); //dragonFight.tryRespawn(aboveBlockPos); // Paper - Perf: Do crystal-portal proximity check before entity lookup // Leaves
|
|
}
|
|
}
|
|
|
|
diff --git a/net/minecraft/world/level/dimension/end/EndDragonFight.java b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
|
index d2e49f8490bff739a3726e73a303b2c24c47617f..5a616d89522aacd1230e356197dec49abcfef872 100644
|
|
--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
|
+++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
|
@@ -577,12 +577,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 blockPos = this.portalLocation;
|
|
if (blockPos == null) {
|
|
@@ -597,6 +599,7 @@ public class EndDragonFight {
|
|
|
|
blockPos = this.portalLocation;
|
|
}
|
|
+ /* Leaves
|
|
// Paper start - Perf: Do crystal-portal proximity check before entity lookup
|
|
if (placedEndCrystalPos != null && !level.paperConfig().misc.allowRemoteEnderDragonRespawning) {
|
|
// The end crystal must be 0 or 1 higher than the portal origin
|
|
@@ -612,7 +615,7 @@ public class EndDragonFight {
|
|
}
|
|
}
|
|
// Paper end - Perf: Do crystal-portal proximity check before entity lookup
|
|
-
|
|
+ */
|
|
|
|
List<EndCrystal> list = Lists.newArrayList();
|
|
BlockPos blockPos1 = blockPos.above(1);
|