<BUG>if(player.worldObj.getBiomeForCoordsBody(placement) != BiomeGenMinestuck.mediumOcean)</BUG><CONTEXT>int x = (int) Math.sqrt(i*d);int z = (int) Math.sqrt(i*(1-d));if(rand.nextBoolean()) x = -x;if(rand.nextBoolean()) z = -z;BlockPos placement = pos.add(x, 0, z);<extra_id_0>location = new Location(player.worldObj.getTopSolidOrLiquidBlock(placement), dim);} while(location == null);	//TODO replace with a more friendly version without a chance of freezing the gameelse Debug.errorf("Unexpected error: Couldn't find position for land gate for dimension %d.", dim);</CONTEXT>
if(player.worldObj.getBiomeForCoordsBody(placement) == BiomeGenMinestuck.mediumNormal)