PaperMC/patches/removed/1.17/0185-Fix-Dragon-Server-Crashes.patch

24 lines
1.3 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Mar 2018 20:52:07 -0400
Subject: [PATCH] Fix Dragon Server Crashes
If the dragon tries to find "ground" and hits a hole, or off edge,
it will infinitely keep looking for non air and eventually crash.
2021-06-12 21:30:37 +02:00
Fixed in 1.15
2021-06-11 14:02:28 +02:00
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
2021-06-12 21:30:37 +02:00
index df44bfce8cc492cd901dfa86331b9be7f1e13837..9eca797b4db96c5f2bb93d260f8e84077d92854a 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
2021-06-12 21:30:37 +02:00
@@ -64,7 +64,7 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
double h = g;
BlockPos.MutableBlockPos mutableBlockPos = new BlockPos.MutableBlockPos(d, g, e);
2021-06-11 14:02:28 +02:00
2021-06-12 21:30:37 +02:00
- while(this.dragon.level.isEmptyBlock(mutableBlockPos)) {
+ while(this.dragon.level.isEmptyBlock(mutableBlockPos) && g > 0) { // Paper
--h;
if (h < 0.0D) {
h = g;