Merge pull request #876 from Kamesuta/1.7-final

Infinite loop problem from Bedrock Dimension in SkyBlock.
This commit is contained in:
Katrina Swales authored and GitHub committed 2017-07-24 21:01:39 +01:00
commit 3388dd2296
1 file changed
+6
@@ -152,6 +152,12 @@ public class BlockBedrockPortal extends BlockMod {
while (entity.worldObj.getBlock(x, y, z) == Blocks.air || entity.worldObj.getBlock(x, y, z).isAir(par1World, x, y, z)) {
y--;
// Avoid infinite loop.
if (y <= 1) {
y = 120;
// Set up the scaffolding.
entity.worldObj.setBlock(x, y - 1, z, Blocks.stone);
}
}
((EntityPlayerMP) entity).playerNetServerHandler.setPlayerLocation(x + 0.5, y + 3, z + 0.5, 0, 0);