fixed endless loop in teleport trait, closes #38

This commit is contained in:
2016-09-12 22:24:56 +02:00
parent 58eacac28c
commit b7e996a9d7

View File

@@ -67,6 +67,11 @@ public class TraitCurvature extends AbstractTrait {
y++;
}
while (w.getBlockState(new BlockPos(x, y - 1, z)).getBlock() == Blocks.AIR) {
if (y <= 0) {
y = 0;
break;
}
y--;
}