Fix infinite loop in dragon fight when the dragon is over the void.

This commit is contained in:
LexManos 2016-10-11 12:35:18 -07:00
parent 490573a71f
commit cfa63792bc

View file

@ -0,0 +1,11 @@
--- ../src-base/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java
+++ ../src-work/minecraft/net/minecraft/entity/boss/dragon/phase/PhaseSittingFlaming.java
@@ -72,7 +72,7 @@
double d2 = this.field_188661_a.field_70986_h.field_70163_u + (double)(this.field_188661_a.field_70986_h.field_70131_O / 2.0F);
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos(MathHelper.func_76128_c(d0), MathHelper.func_76128_c(d2), MathHelper.func_76128_c(d1));
- while (this.field_188661_a.field_70170_p.func_175623_d(blockpos$mutableblockpos))
+ while (this.field_188661_a.field_70170_p.func_175623_d(blockpos$mutableblockpos) && d2 >= 0) //Forge: Fix infinite loop if ground is missing.
{
--d2;
blockpos$mutableblockpos.func_181079_c(MathHelper.func_76128_c(d0), MathHelper.func_76128_c(d2), MathHelper.func_76128_c(d1));